RetroELEC Kodi+Wayland+Emulationstation+RetroArch (x86/XU4/RPi)

  • mtk1

    Do you mind testing the latest? I think I've got it right this time. Pulseaudio behaves differently with regards to it's runtime dir when in system mode like in LE, and the upstream package hasn't gotten much attention since the OpenELEC days.

    Execute rm -rf /storage/.config/pulse* before rebooting. I've tested thoroughly Kodi/ES/RA and pacmd/pactl, everything seems to be in order. As a bonus I've set KODI_AE_SINK=ALSA+PULSE which gives you the ability to connect bluetooth speakers through PA, and added the zeroconf-discover module which automatically detects other PA installations on your network. They will show up in Kodi automagically :)

    I've tested passthrough in PA and it seems to work great actually. If you want to try full PA setup, add KODI_AE_SINK=PULSE to /storage/.config/kodi.conf and run pactl set-sink-formats $(pactl list sinks short | grep -v NON-DEFAULT | awk '{print $1}') "pcm; ac3-iec61937; dts-iec61937; eac3-iec61937". This will give you DTS/AC3/EAC3 passtrough with PA ;)

  • mtk1

    Do you mind testing the latest? I think I've got it right this time. Pulseaudio behaves differently with regards to it's runtime dir when in system mode like in LE, and the upstream package hasn't gotten much attention since the OpenELEC days.

    Execute rm -rf /storage/.config/pulse* before rebooting. I've tested thoroughly Kodi/ES/RA and pacmd/pactl, everything seems to be in order. As a bonus I've set KODI_AE_SINK=ALSA+PULSE which gives you the ability to connect bluetooth speakers through PA, and added the zeroconf-discover module which automatically detects other PA installations on your network. They will show up in Kodi automagically :)

    I've tested passthrough in PA and it seems to work great actually. If you want to try full PA setup, add KODI_AE_SINK=PULSE to /storage/.config/kodi.conf and run pactl set-sink-formats $(pactl list sinks short | grep -v NON-DEFAULT | awk '{print $1}') "pcm; ac3-iec61937; dts-iec61937; eac3-iec61937". This will give you DTS/AC3/EAC3 passtrough with PA ;)

    Kodi: In ALSA+PULSE mode, I do get audio via ALSA/HDMI#0. If I choose PULSE, there's no audio. If I then switch back to ALSA, there's still no audio. After a reboot, audio via ALSA works (maybe restarting kodi would be sufficient - I can test if you like).

    ES: no audio

    RA: Audio works, but still crackling. Yes, it could be due to my not so powerful setup. But, we are talking about 'Doom' here, first level, not moving. FPS is between 49.9 and 50.04.


    Full PA: Your shell command fails:

     cinemax:~ # pactl set-sink-formats $(pactl list sinks short | grep -v NON-DEFAULT | awk '{print $1}') "pcm; ac3-iec61937; dts-iec61937; eac3-iec61937"

    Failure: No such extension 

     cinemax:~ # pactl list sinks short | grep -v NON-DEFAULT | awk '{print $1}'

     cinemax:~ # pactl list sinks short

    1 alsa_output.pci-0000_00_0e.0.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED unmuted 100% DEFAULT 

    Nevertheless, I get audio in Kodi ! There are no options to enable or configure passthrough in the audio menu (Expert mode).

    Kodi claims to be in passthrough mode. My receiver shows its seeing PCM.

    Edited once, last by mtk1 (February 14, 2020 at 7:53 AM).

  • Kodi: In ALSA+PULSE mode, I do get audio via ALSA/HDMI#0. If I choose PULSE, there's no audio. If I then switch back to ALSA, there's still no audio. After a reboot, audio via ALSA works (maybe restarting kodi would be sufficient - I can test if you like).

    You need to restart Kodi after changing KODI_AE_SINK.

    ES: no audio

    You are aware that there's no audio (not in the included theme anyways) except for video previews right?


    RA: Audio works, but still crackling. Yes, it could be due to my not so powerful setup. But, we are talking about 'Doom' here, first level, not moving. FPS is between 49.9 and 50.04.

    Doom 1? Doom 3? I suppose the latter, and 50FPS sounds to me like vsync with 50Hz refresh rate. That'll probably mess up sound as RA adjusts accordingly. I haven't tested the dhewm3 core myself, could you try some other core please, and provide logs.

    Full PA: Your shell command fails:

    I found the issue, the extensions required was in module-device-restore which I removed while trimming down the system.pa config file.

    It should be fixed now in the latest image, try again. Further adjusted PA to fit in with LibreELEC paths, it will now store persistent device/stream configuration in /storage/.cache/pulse instead of under /var which is tmpfs.

  • Quote

    You need to restart Kodi after changing KODI_AE_SINK.

    Yep, I did.

    Quote

    You are aware that there's no audio (not in the included theme anyways) except for video previews right?

    Oh. No menu sounds ? OK, my mistake. Sorry. I thought I've an ES with menu sounds somewhere...

    Quote

    Doom 1? Doom 3? I suppose the latter, and 50FPS sounds to me like vsync with 50Hz refresh rate. That'll probably mess up sound as RA adjusts accordingly. I haven't tested the dhewm3 core myself, could you try some other core please, and provide logs

    VSync was the default. No good ? Will try different core over the weekend an report back.

    Quote

    I found the issue, the extensions required was in module-device-restore which I removed while trimming down the system.pa config file.

    It should be fixed now in the latest image, try again. Further adjusted PA to fit in with LibreELEC paths, it will now store persistent device/stream configuration in /storage/.cache/pulse instead of under /var which is tmpfs.

    Nice. Will try that out over the weekend. Thx.

  • Yep, I did.

    Also set "keep audio device alive" to off and "send low volume noise" to off. If you have previously set the PA sink as your audio device in Kodi, it might get locked before ALSA becomes available. Of course you can turn on all these things if you set PULSE. Passthrough is working great, except for HD audio of course which isn't quite ready yet AFAIK. In any case, ALSA/ALSA+PULSE/PULSE all work here in the latest image.

    I think there is too much obsession over passthrough, there isn't any loss when decoding to PCM.

    Oh. No menu sounds ? OK, my mistake. Sorry. I thought I've an ES with menu sounds somewhere...

    There is sounds if the theme supports it (tronkyfran does not). Scrape your collection and you should get sound from the video previews. What more could you need :)

    VSync was the default. No good ? Will try different core over the weekend an report back.

    I think you misunderstand. Vsync is great if your screens refresh matches your content. If it doesn't, RetroArch will try to adjust the speed of the audio to compensate. Like I said, try some other systems. Make sure your screen is 60Hz and video framerate in RA settings matches, then use NTSC roms for best results. Unless you know the PAL versions are 60Hz compatible. For Amiga/C64/Spectrum you can/should use PAL versions, as I've set up PAL switching for those.

  • Hi,

    Thank you very much for your hard work!! I need a little help to begin. I have a RPi 3b+. So which version should I use? RPi2 or RPi4? I tried both, and both hang during booting at the RertoELEC logo. So I guess there is no working image with RPi3b+...?

    Thanks!

  • Hi,

    Thank you very much for your hard work!! I need a little help to begin. I have a RPi 3b+. So which version should I use? RPi2 or RPi4? I tried both, and both hang during booting at the RertoELEC logo. So I guess there is no working image with RPi3b+...?

    Thanks!

    RPi2 is for RPi2/3/3+ as they are more or less built on the same architecture.

    I had an earlier version working properly with my RPi2 (specifically RetroELEC-RPi2.arm-9.2-devel-20200208153230-28eddc2.img). I likely have some time today to test out the latest version that escalade has posted.

  • I've rebased Kodi to latest Leia in the new image, if it doesn't start for some reason the logs would be useful. The network should come up if you have a cabled connection or have upgraded from a previous image.

  • New RPi4 image online, I had done the rebase wrong so re-did it on latest Leia git again. Should work :)

    EDIT: RPi2 uploaded as well.

    I've decided to go with KODI_AE_SINK=PULSE from now on, as Kodi will decode the audio just fine, there's zero difference. On the plus side, sound will just work, you can adjust the audio and stream A2DP without interruptions.

  • Hi jaykass and escalade

    first of all, thank you for your immediate support - really impressive!

    I tried the new RPi2 version but I have the same issue. I see the RetroELEC logo which freezes after 4/5 minutes. When I use the arrow buttons I can see a command line which sais "Starting debugging shell for boot step: mount_storage... type exit to quit"

    There is wired ethernet connection but it doesn't get an IP and I can't paste a log file - at least with my limited knowledge.

    I cross checked my workflow of bringing an image to the SD Card with the regular LE version. This works properly. The Kodi installation works and RPi gets an IP from DHCP as well..

    Is there anything simple a noob can do wrong? ...Like attaching a gamepad or something else?

    The RPi is connected via HDMI with a keyboard attached - nothing else.

    Please apologise - didn't want to cause trouble...!

  • RetroELEC-RPi4.arm-9.2-devel-20200216110647-28eddc2.img

    Boots to Kodi but does not accept any input from my flirc (should be recognized as a usb hid) or from yatse (android remote app for kodi). Though, using yatse, I was able to get videos to play. When a video is playing, there is no sound.

    Logs attached.

    I tried the new RPi2 version but I have the same issue. I see the RetroELEC logo which freezes after 4/5 minutes. When I use the arrow buttons I can see a command line which sais "Starting debugging shell for boot step: mount_storage... type exit to quit"

    There seem to be some existing issues with RPi2.

    escalade, any chance you still have RetroELEC-RPi2.arm-9.2-devel-20200208153230-28eddc2.img available? If not, would you mind if I posted it for Bub4 to test out? Since that one seemed to work for me when I tested it previously.

  • Also set "keep audio device alive" to off and "send low volume noise" to off. If you have previously set the PA sink as your audio device in Kodi, it might get locked before ALSA becomes available. Of course you can turn on all these things if you set PULSE. Passthrough is working great, except for HD audio of course which isn't quite ready yet AFAIK. In any case, ALSA/ALSA+PULSE/PULSE all work here in the latest image.

    I think there is too much obsession over passthrough, there isn't any loss when decoding to PCM.

    When configuring Kodi to use PULSE, all passthrough settings are disabled and my receiver claims to be receiving PCM. In ALSA mode, this works fine. So, I'll just stick with ALSA.

    Wrt\ to 'obsession'. I would assume that my Yahama receiver does a better job in the decoding, conditioning and up/down-mixing the audio stream for my speaker setup. But, yeah, at some point it might become a question of 'believe' ;)

    Quote

    I think you misunderstand. Vsync is great if your screens refresh matches your content. If it doesn't, RetroArch will try to adjust the speed of the audio to compensate. Like I said, try some other systems. Make sure your screen is 60Hz and video framerate in RA settings matches, then use NTSC roms for best results. Unless you know the PAL versions are 60Hz compatible. For Amiga/C64/Spectrum you can/should use PAL versions, as I've set up PAL switching for those.

    I tried it with Doom64 for N64 - supposedly the US version, hoping that this would be an NTSC ROM. I didn't get to dig into this deeper, yet.