[SOLVED] Load pulseaudio module

  • Hi, I need to load zeroconf-discover module for pulseaudio streaming.

    Usually I do this by editing corresponding *.pa file under /etc/pulse. However it's readonly in libreelec.

    Are there other ways to load pulsaudio module by default in libreElec?

    Thanks

    Edited once, last by edio: mark as solved (February 12, 2018 at 3:19 AM).

  • Solved by modifying SYSTEM file from SD card.

    unsquashfs, modified /etc/pulse/system.pa, mksquashfs, and copied resulting SYSTEM file with corresponding md5 file back to SD card.

  • Hey there, dragging up an old thread incase it's helpful to others down the road, I spun my wheels quite a bit before I realised what the issue was.

    Modules cannot be loaded in the /storage/.config/pulse-daemon.conf.d/ file. It is only used for changing pulse audio settings. Like the ones listed here

    Pulseaudio [LibreELEC.wiki]

    If you need to load a module, you must use /storage/.config/autostart.sh (Autostart.sh [LibreELEC.wiki])

    In my case I simply added these lines for loading RTP multicast receiving on boot.

    Code
    pactl load-module module-udev-detect
    pactl load-module module-http-protocol-tcp
    pactl load-module module-rtp-recv
  • I have some issue with this load-module in autostart.sh.

    I have autostart.sh with:

    Code
    pactl load-module module-udev-detect

    but the ALSA source/sinks is not correctly loaded I think because ALSA is not still loaded, some idea to solve it?

    One possible solution is sequencing activities on boot but I would like to find a leaner way...

  • The precise ordering that's possible with systemd *is* the leanest way. Anything else requires guessing (the timing) and hoping (that you guessed correctly). Note that startup scripts will often need "/path/to/pactl" not "pactl" in them.

  • It is possible to specify a custom PulseAudio startup script using the default-script-file config parameter. So another option without autostart.sh would be:

    Code: /storage/.config/pulse-daemon.conf.d/custom.conf
    default-script-file = /storage/.config/pulse-daemon.conf.d/custom.pa
    Bash: /storage/.config/pulse-daemon.conf.d/custom.pa
    #!/usr/bin/pulseaudio -nF
    
    .fail
    .include /etc/pulse/default.pa
    
    # extend default startup script
    load-module module-rtp-recv latency_msec=250 sap_address=0.0.0.0