Moonlight + Alsa

  • Anyone got moonlight addon x64 working with alsa? If so how? Ive tried hw:0,3 which is the correct alsa soundcard and it doesnt work. Picture, and controller work but zero sound. sysdefault do nothing as does changing the soundcard to hw:0,0 like suggest by the addon creator.


  • Anyone got moonlight addon x64 working with alsa? If so how? Ive tried hw:0,3 which is the correct alsa soundcard and it doesnt work. Picture, and controller work but zero sound. sysdefault do nothing as does changing the soundcard to hw:0,0 like suggest by the addon creator.

    I do not know moonlight, but I might help with ALSA.

    To know what PCMs are active, use the command cat /proc/asound/pcm.
    If that file does not exist or is empty, no PCM is active.
    If that file exists, it contains a list of available PCMs, eg

    Code
    00-00: bcm2835 ALSA : bcm2835 ALSA : playback 8
    00-01: bcm2835 ALSA : bcm2835 IEC958/HDMI : playback 1


    In the example above, you could try using hw:0,0 or hw:0,1.

    It might also be possible to use the names provided by aplay -L, eg

    Code
    null
        Discard all samples (playback) or generate zero samples (capture)
    default:CARD=ALSA
        bcm2835 ALSA, bcm2835 ALSA
        Default Audio Device
    sysdefault:CARD=ALSA
        bcm2835 ALSA, bcm2835 ALSA
        Default Audio Device


    In the example above, default:CARD=ALSA or sysdefault:CARD=ALSA.

    If they work, prefer names to addresses.

  • LibreELEC:~ # cat /proc/asound/pcm
    00-03: HDMI 0 : HDMI 0 : playback 1
    00-07: HDMI 1 : HDMI 1 : playback 1
    00-08: HDMI 2 : HDMI 2 : playback 1
    01-00: ALC283 Analog : ALC283 Analog : playback 1 : capture 1

    LibreELEC:~ # aplay -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, HDMI 0
    HDMI Audio Output
    hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
    hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
    default:CARD=PCH
    HDA Intel PCH, ALC283 Analog
    Default Audio Device
    sysdefault:CARD=PCH
    HDA Intel PCH, ALC283 Analog
    Default Audio Device
    front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    Front speakers
    surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

    LibreELEC:~ # aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
    Subdevices: 0/1
    Subdevice #0: subdevice #0


    Im taking it that mine are defaulted to the headphone connection on the rear of my chromebox?
    EDIT: Ive tried using hw:1,0 which is the rear headphone socker and im getting sound from kodi, but nothing from moonlight, also told kodi not to keep sound connection alive.

    This is my asound.conf

    defaults.ctl.card 1
    defaults.pcm.card 0
    defaults.pcm.device 3

    Edited once, last by stuCONNERS (August 11, 2016 at 8:42 PM).

  • I`ve tried:
    default
    sysdefault
    hw:0,0
    hw:0,3
    hw:0,8
    hw:1,0


    LibreELEC:~ # amixer -c 1 contents
    numid=10,iface=CARD,name='Headphone Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off
    numid=9,iface=CARD,name='Mic Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off
    numid=2,iface=MIXER,name='Master Playback Switch'
    ; type=BOOLEAN,access=rw------,values=2
    : values=on,on
    numid=1,iface=MIXER,name='Master Playback Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0
    : values=87,87
    | dBscale-min=-65.25dB,step=0.75dB,mute=0
    numid=15,iface=MIXER,name='PCM Playback Volume'
    ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
    : values=255,255
    | dBscale-min=-51.00dB,step=0.20dB,mute=0
    numid=8,iface=MIXER,name='Mic Boost Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
    : values=0,0
    | dBscale-min=0.00dB,step=12.00dB,mute=0
    numid=5,iface=MIXER,name='Mic Playback Switch'
    ; type=BOOLEAN,access=rw------,values=2
    : values=off,off
    numid=4,iface=MIXER,name='Mic Playback Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
    : values=0,0
    | dBscale-min=-34.50dB,step=1.50dB,mute=0
    numid=7,iface=MIXER,name='Capture Switch'
    ; type=BOOLEAN,access=rw------,values=2
    : values=off,off
    numid=6,iface=MIXER,name='Capture Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
    : values=0,0
    | dBscale-min=-17.25dB,step=0.75dB,mute=0
    numid=3,iface=MIXER,name='Loopback Mixing'
    ; type=ENUMERATED,access=rw------,values=1,items=2
    ; Item #0 'Disabled'
    ; Item #1 'Enabled'
    : values=1
    numid=12,iface=MIXER,name='Beep Playback Switch'
    ; type=BOOLEAN,access=rw------,values=2
    : values=off,off
    numid=11,iface=MIXER,name='Beep Playback Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
    : values=0,0
    | dBscale-min=-34.50dB,step=1.50dB,mute=0
    numid=14,iface=PCM,name='Capture Channel Map'
    ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
    : values=0,0
    | container
    | chmap-fixed=FL,FR

    numid=13,iface=PCM,name='Playback Channel Map'
    ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
    : values=0,0
    | container
    | chmap-fixed=FL,FR

    LibreELEC:~ # amixer -c 0 contents
    numid=1,iface=CARD,name='HDMI/DP,pcm=3 Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=on
    numid=7,iface=CARD,name='HDMI/DP,pcm=7 Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off
    numid=13,iface=CARD,name='HDMI/DP,pcm=8 Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off
    numid=2,iface=MIXER,name='IEC958 Playback Con Mask'
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
    numid=8,iface=MIXER,name='IEC958 Playback Con Mask',index=1
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
    numid=14,iface=MIXER,name='IEC958 Playback Con Mask',index=2
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
    numid=3,iface=MIXER,name='IEC958 Playback Pro Mask'
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
    numid=9,iface=MIXER,name='IEC958 Playback Pro Mask',index=1
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
    numid=15,iface=MIXER,name='IEC958 Playback Pro Mask',index=2
    ; type=IEC958,access=r-------,values=1
    : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
    numid=4,iface=MIXER,name='IEC958 Playback Default'
    ; type=IEC958,access=rw------,values=1
    : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
    numid=10,iface=MIXER,name='IEC958 Playback Default',index=1
    ; type=IEC958,access=rw------,values=1
    : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
    numid=16,iface=MIXER,name='IEC958 Playback Default',index=2
    ; type=IEC958,access=rw------,values=1
    : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
    numid=5,iface=MIXER,name='IEC958 Playback Switch'
    ; type=BOOLEAN,access=rw------,values=1
    : values=on
    numid=11,iface=MIXER,name='IEC958 Playback Switch',index=1
    ; type=BOOLEAN,access=rw------,values=1
    : values=on
    numid=17,iface=MIXER,name='IEC958 Playback Switch',index=2
    ; type=BOOLEAN,access=rw------,values=1
    : values=on
    numid=6,iface=PCM,name='ELD',device=3
    ; type=BYTES,access=r--v----,values=83
    : values=0x10,0x00,0x07,0x00,0x67,0x12,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x2d,0x09,0x05,0x53,0x41,0x4d,0x53,0x55,0x4e,0x47,0x09,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
    numid=19,iface=PCM,name='Playback Channel Map',device=3
    ; type=INTEGER,access=rw---R--,values=8,min=0,max=36,step=0
    : values=0,0,0,0,0,0,0,0
    | container
    | chmap-variable=FL,FR
    | chmap-variable=FL,FR,LFE
    | chmap-variable=FL,FR,FC
    | chmap-variable=FL,FR,RC
    | chmap-variable=FL,FR,RL,RR
    | chmap-variable=FL,FR,LFE,FC
    | chmap-variable=FL,FR,LFE,RC
    | chmap-variable=FL,FR,FC,RC
    | chmap-variable=FL,FR,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR
    | chmap-variable=FL,FR,FC,RL,RR
    | chmap-variable=FL,FR,LFE,FC,RC
    | chmap-variable=FL,FR,RL,RR,RC
    | chmap-variable=FL,FR,LFE,FLC,FRC
    | chmap-variable=FL,FR,FC,FLC,FRC
    | chmap-variable=FL,FR,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR
    | chmap-variable=FL,FR,LFE,RL,RR,RC
    | chmap-variable=FL,FR,FC,RL,RR,RC
    | chmap-variable=FL,FR,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RC,FLC,FRC
    | chmap-variable=FL,FR,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TC
    | chmap-variable=FL,FR,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC
    | chmap-variable=FL,FR,LFE,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TC
    | chmap-variable=FL,FR,LFE,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,FC,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLW,FRW

    numid=12,iface=PCM,name='ELD',device=7
    ; type=BYTES,access=r--v----,values=0
    : values=
    numid=20,iface=PCM,name='Playback Channel Map',device=7
    ; type=INTEGER,access=rw---R--,values=8,min=0,max=36,step=0
    : values=0,0,0,0,0,0,0,0
    | container
    | chmap-variable=FL,FR
    | chmap-variable=FL,FR,LFE
    | chmap-variable=FL,FR,FC
    | chmap-variable=FL,FR,RC
    | chmap-variable=FL,FR,RL,RR
    | chmap-variable=FL,FR,LFE,FC
    | chmap-variable=FL,FR,LFE,RC
    | chmap-variable=FL,FR,FC,RC
    | chmap-variable=FL,FR,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR
    | chmap-variable=FL,FR,FC,RL,RR
    | chmap-variable=FL,FR,LFE,FC,RC
    | chmap-variable=FL,FR,RL,RR,RC
    | chmap-variable=FL,FR,LFE,FLC,FRC
    | chmap-variable=FL,FR,FC,FLC,FRC
    | chmap-variable=FL,FR,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR
    | chmap-variable=FL,FR,LFE,RL,RR,RC
    | chmap-variable=FL,FR,FC,RL,RR,RC
    | chmap-variable=FL,FR,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RC,FLC,FRC
    | chmap-variable=FL,FR,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TC
    | chmap-variable=FL,FR,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC
    | chmap-variable=FL,FR,LFE,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TC
    | chmap-variable=FL,FR,LFE,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,FC,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLW,FRW

    numid=18,iface=PCM,name='ELD',device=8
    ; type=BYTES,access=r--v----,values=0
    : values=
    numid=21,iface=PCM,name='Playback Channel Map',device=8
    ; type=INTEGER,access=rw---R--,values=8,min=0,max=36,step=0
    : values=0,0,0,0,0,0,0,0
    | container
    | chmap-variable=FL,FR
    | chmap-variable=FL,FR,LFE
    | chmap-variable=FL,FR,FC
    | chmap-variable=FL,FR,RC
    | chmap-variable=FL,FR,RL,RR
    | chmap-variable=FL,FR,LFE,FC
    | chmap-variable=FL,FR,LFE,RC
    | chmap-variable=FL,FR,FC,RC
    | chmap-variable=FL,FR,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR
    | chmap-variable=FL,FR,FC,RL,RR
    | chmap-variable=FL,FR,LFE,FC,RC
    | chmap-variable=FL,FR,RL,RR,RC
    | chmap-variable=FL,FR,LFE,FLC,FRC
    | chmap-variable=FL,FR,FC,FLC,FRC
    | chmap-variable=FL,FR,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR
    | chmap-variable=FL,FR,LFE,RL,RR,RC
    | chmap-variable=FL,FR,FC,RL,RR,RC
    | chmap-variable=FL,FR,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RC,FLC,FRC
    | chmap-variable=FL,FR,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TC
    | chmap-variable=FL,FR,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC
    | chmap-variable=FL,FR,LFE,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RC,FLC,FRC
    | chmap-variable=FL,FR,LFE,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TC
    | chmap-variable=FL,FR,LFE,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,FC,RL,RR,FLW,FRW
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RLC,RRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLC,FRC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,RC,TFC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFC,TC
    | chmap-variable=FL,FR,LFE,FC,RL,RR,TFL,TFR
    | chmap-variable=FL,FR,LFE,FC,RL,RR,FLW,FRW

    Ive tried keeping audio device alive and not in kodi. i know the pc with nvidia graphics card is fine as moonlight on Rpi works fine with sound on the same tv.

  • If none of the below work, I am at my wits' end

    hdmi:CARD=HDMI,DEV=0
    hdmi:CARD=HDMI,DEV=1
    hdmi:CARD=HDMI,DEV=2
    default:CARD=PCH
    sysdefault:CARD=PCH
    front:CARD=PCH,DEV=0
    surround21:CARD=PCH,DEV=0
    surround40:CARD=PCH,DEV=0
    surround41:CARD=PCH,DEV=0
    surround50:CARD=PCH,DEV=0
    surround51:CARD=PCH,DEV=0
    surround71:CARD=PCH,DEV=0

  • Thanks for the help. Im starting to think that changing the setting in moonlight doesnt actually change anything. The hw:0,3 is the correct one, I checked with mupen emulator which required asound.conf, and retroarch which required hw:0,3 in the settings. I`ll message the addon creator.