Posts by chipfunk

    Hi coleb,

    that's just the display-names for the audio-devices, not their identifier. Do you have the possibility to SSH into the machine and run

    Code
    aplay -L

    to find the proper device-id? Because that's the prerequisite for further steps. I think its a good idea to stop the BruteFIR-service before doing so.


    After you found the device-id for ALSA you can start editing the file /storage/kodi/addons/brutefir/bin/startup.sh from

    Code
    pactl load-module module-alsa-sink >> $PULSEAUDIO_MODULES_FILE

    to

    Code
    pactl load-module module-alsa-sink device="ALSA_ID" >> $PULSEAUDIO_MODULES_FILE

    to make pulseaudio take control of the device. That should give you a new PulseAudio-sink named alsa_output.ALSA_ID. You can run pactl list-sinks to verify.


    After that the output-section of BruteFIR-config has to point to the new PulseAudio sink, like so

    Code
    output "left", "right" {
           device: "pulse" {
                   device: "alsa_output.ALSA_ID";


    Restarting the service should play your audio on the new device.


    For more options on how to load PulseAudio-modules please see https://www.freedesktop.org/wiki/Software/…cedrivermodules and https://www.freedesktop.org/wiki/Software/…odule-alsa-sink.


    HTH

    yes, i can confirm that after selecting the PULSE:Null Output audio works via HDMI.

    Awesome, you're the first giving me feedback on that, thanks a lot.

    I certainly will come back to you once i'll try to activate my USB-DAC(s) ihave attached to the TV box instead of the HDMI as sink(s) for brutfir output. And setting up a room correction filter will also be on my task list (Euipment is already availabe REW, UMIK, ..).

    Oh nice, multi-device/-stream support, that's a use-case i haven't tried yet :)

    You seem to be proficient in these things, but other might be not, so i'll leave my thoughts about it here. I see two options to achieve it.

    First idea would be to use PulseAudio to control the DACs by` loading the module-alsa-sink multiple times, once per DAC. Appropriate parameters (ALSA-)device and sink_name can be appended here. The given sink_name should then be set in brutefir-config as device: alsa-output.sink_name.

    A second option could be to configure BruteFIR to output to ALSA directly. This should result in a lower latency. For this to work PulseAudio's alsa-module shouldn't be loaded, as your ALSA-device would be blocked by PulseAudio then.

    Looking forward to hear about your experience,

    HTH, good luck :)

    Hey coleb,

    happy to help and hear you made progress, thanks for reporting back :)

    IIRC i made the default setup to pass two channels of Kodi's audio-signal through BruteFIR without filtering to the default ALSA-device. So even if you didn't configure anything yet you should be hearing Kodi's menu-sounds on two channels of ALSA default-device (which is HDMI in my case).

    Good luck and please do not hesitate to ask further questions.

    Hi coleb,

    sorry for not getting back to you in a timely manner, somehow i did not receive update-notifications for this thread.

    Thanks for your interest and bug report. The repository was set to private-access, that was giving the 404-error. I made the repository public, so the source-code for the addon should be available here: https://github.com/chipfunk/LibreELEC.tv-addon-brutefir now. The links to the binary packages from this post should be available too.


    Sorry for the hickup, please let me know if you encounter any more problems.

    Hi all,

    i'd like to introduce you to my addon providing a "BruteFIR" systemd-service with ALSA/PulseAudio support.

    https://github.com/chipfunk/LibreELEC.tv-addon-brutefir

    To realize it i created a new BruteFIR IO-module 'pulse' to allow for direct access to PulseAudio from within BruteFIR (https://github.com/chipfunk/brutefir). I was then able to package it as an addon (together with its dependencies fftw3/fftw3f). Creating startup and shutdown-scripts for the (still required) PulseAudio-modules (module-null-sink for input and module-alsa-sink for output), together with corresponding input-/output-configuration for BruteFIR, allows for a plug-n-play installation.

    This addon features:

    - BruteFIR running as a systemd.service
    - direct PulseAudio support as BFIO-module
    - configurable target device-names to control/hint connectivity for PulseAudio-server
    - PulseAudio-server, application- and stream-name are also configurable, to allow for networked multi-filter/-process/-stream setups (not tested though)

    I didn't test mixing different BruteFIR io-modules (e.g. PulseAudio in, ALSA out) yet, but expect it to work.

    Currently it is performing well, running two 4096-long kernels for my stereo-setup on a Odroid-C2 with 15% to 20% utilization and surviving multiple power-up-/down cycles.

    I was able to build it for all supported targets in LibreELEC 11.0.4.


    A big thank you to all the developers making this possible.


    I'm looking into uploading the binary packages to github, but need some more time todo so.


    I'd be happy to hear your opinions on improvements and/or bug-reports.

    Hey ariendj,

    finally i got the first addon compiled and packaged, it's the rt-plugins by Richard Taylor. I attached the addons for Odroid C2 (audio.rt-plugins-8.2.0-Odroid_C2-aarch64.zip) and RPi2/3 (audio.rt-plugins-8.2.0-RPi2-arm.zip).


    Installation:

    Just install addon from zip-file.


    Pulseaudio-integration

    Before the configuration of ladpspa-plugin-sinks in /storage/.config/autostart.sh pulseaudio has to be informed where to look for the ladspa-plugins. To do so i set the environment-variable LADSPA_PATH for systemd, reload systemd and restart the pulseaudio.service to pick-up the new environment-variable. like so

    Code
    # tell pulseaudio to load ladspa-plugins from addon-dir
    systemctl set-environment LADSPA_PATH=$LADSPA_PATH:'/storage/.kodi/addons/audio.rt-plugins/lib/ladspa'
    systemctl daemon-reload
    systemctl restart pulseaudio.service
    
    # wait for pulseaudio to complete restart before configuring ladspa-filter-sinks
    sleep 5
    
    # ... pulseaudio config follows below ...


    FFTW and zita-convolver are also nearly done, currently bmc0/dsp and bruteFIR aren't compiling.


    So no much news, but getting there :) cheers

    Hey ariendj,

    pls do NOT waste time testing the brutefir-branch, as its not building BruteFIR yet (i would be very very suprised :). The branch containing the rt-plugins should build fine, but i see why you want the BruteFIR thing done ;)

    In the meantime i could salvage an old IDE-HDD (took me two days alone because of broken cables and USB-IDE-case) and use it as USB-storage for the build-VM, so now there is slow but enough space to build for Odroid-C2, RPi3 and maybe others. I managed to package FFTW as a dependency of zita-convolver (still ugly, but building), as bmc0/dsp (not yet building ;) relies on it. But i'm not finished, thats why i didn't commit the code by now. Excellent you could setup a build-box, so we can test and build in parallel. I'll try to check in the code as fast as possible, hopefully by wednesday.

    I saw the rhythmbox-plugin too but didn't have time to have a look at it. Pls report back if you got any success on the measurement-process as i didn't evaluated that yet (have to get a decent microphone first). This would be the next step after i got the playback-software up and running.

    Cheers.

    Hey ariendj,

    thanks for the valueable input and your offer to test things.

    I'm still learning how to package addons, yesterday i messed up my build-environment by updating GCC. So it will need some time to setup a build-box based on Ubuntu 16.04 as recommended in the wiki ;) Hope this will give me a more stable foundation to develop.

    I'll keep you updated.

    Hey ariendj,

    thanks for your interest in this project, your setup sounds exactly like the target i'd like to archieve, very nice :)

    To explain how i try to set things up i added some READMEs to the appropriate branches, please see here for the rt-plugins and here for BruteFIR.

    I'd like to encourage everyone to ask further questions as i will use these to improve the existing documentation.

    Next steps: i think i should convert the packages to installable add-ons first so i dont have to build, flash and install a complete distribution every time i change something.

    Hi there,

    thanks for all the time and effort put into this project, i hope my first post can give you something back.

    I wanted to use my 4-channel USB-soundcard (Focusrite Saffire 6 USB) to drive a 2.1 speaker system. Having LibreELEC running on a Odroid C2 i used PulseAudio to stream audio to another BananaPi which did the filtering using Richard Taylors rt-plugins hosted on PulseAudio-module module-ladspa-sink.

    Using 2 SBCs seemed overkill so i tried to embed Richards plugins into LibreELEC. The process was quite simple, starting out by setting up the build-environment as described in the Wiki, creating the appropriate package under packages/audio/rt-plugins and the corresponding package.mk file.

    You can checkout my current result on GitHub - chipfunk/LibreELEC.tv at feature/rt-plugins.

    Todos:

    - fix include-path for ladspa.h as its currently fixed for my setup


    Future ideas:

    ATM i have to build the complete image to have the rt-plugins available, maybe i will have the time to make it an optional add-on.


    Please feel free to ask further questions.