Forwarding audio input to output in libreelec?

  • Dear All,

    I was wondering whether if it´s possible to let libreelec forward an incoming audio signal to the output, either mixed with audio playing libreelec (from for instance a movie) or without it.

    I´d be using a hifiberry board for everything here, and I´d need to make sure that the system can give me the lowest latency possible from input to output as well, as part of the inputsound is from a midi keyboard. I assume that the latency would be ruined if I use audio through HDMI, so I´d be using a hifiberry with optical in and analog out.

    And if this all works, will there be issues with audio and picture out of sync, when watching movies on libreelec, due to audio no longer going via HDMI?

  • This is hard to answer, because so much data is missing on your description. ?(

    What exactly do you want to do?

    What's your hardware (RPi version, HifiBerry version)?

    Which input / output ports do you want to use?

    Do you want to use a MIDI device connected to the RPi?

    If the answer to last question is yes, then LE is not the right OS for you. Instead you'll need a real-time (RT) kernel OS (like Patchbox OS). That will provide low latency MIDI processing.

  • Thanks Da Flex!

    It´s an RPI 4 that I got here, and it´d be this hifiberry board:

    HiFiBerry DAC+ DSP | HiFiBerry

    I simply want to connect another raspberry, which is already set up with midi keyboard, playing vst´s through reaper, and a hifiberry digi+ board with toslink out, to the libreelec rpi´s hifiberry digital input, and then take the analog signal from the hifiberrys out and put it through my amplifier.

    Why? Because the way it is now, where my "DAW-pi" is connected directly to the amps digital input, the latency of the amplifiers DAC is a bit too much - at a latency of just 2.9 ms, I can feel the latency. Setting it to a lower value fixes that, but also starts introducing glitches now and then. Others dont have that problem, and I know that my ears dont hear latency till around 11 ms, hence I conclude that its my 10 year old onkyo amps fault that it´s like that. Hifi-amps arent ment to get you ultralow latency anyway.

    And further to this, it´s pretty convenient that I don´t need to switch between the daw-pi and the libreelec-pi on the amp, if I could do as described here.

  • I think I understand your setup now. You want a pass-through function inside the HiFiBerry DAC. This is not part of LE's audio.

    Those DAC's are made for RPi -> DAC and DAC -> RPi, but not DAC -> DAC. Ask the HiFiBerry support to be sure (they are pretty good).

    I suggest to use something like this instead (and hope for low latency).

  • I think I understand your setup now. You want a pass-through function inside the HiFiBerry DAC. This is not part of LE's audio.

    Those DAC's are made for RPi -> DAC and DAC -> RPi, but not DAC -> DAC. Ask the HiFiBerry support to be sure (they are pretty good).

    I suggest to use something like this instead (and hope for low latency).

    Hi again and thanks for coming back.

    What do you mean with that they´re not meant for DAC to DAC (although I´m talking about DD-DA, and not DA-DA)? The mentioned board provide devices to the system, 1 analog in and out, and 1 digital in and out, which under normal circumstances can be set to route the audio as desired. The question is if they can be set up for that within libreelec.

  • If you go DAC -> RPi -> DAC, then the RPi will become a bottle neck, because incoming DAC data have to go to RPi's bus controller, and then back to GPIO. I belief that the GPIO itself is another bottle neck, because probably the same pins will be used for input / output.

    Even if such a pass-through-over-RPi function exists, it has to be managed by the HiFiBerry driver, not by LE. Again: Ask the HiFiBerry support to get the definite answer. They are friendly and firm. On a regular PC you would be right, and you would get the desired routing options, but an RPi is different.

  • If you go DAC -> RPi -> DAC, then the RPi will become a bottle neck, because incoming DAC data have to go to RPi's bus controller, and then back to GPIO. I belief that the GPIO itself is another bottle neck, because probably the same pins will be used for input / output.

    Even if such a pass-through-over-RPi function exists, it has to be managed by the HiFiBerry driver, not by LE. Again: Ask the HiFiBerry support to get the definite answer. They are friendly and firm. On a regular PC you would be right, and you would get the desired routing options, but an RPi is different.

    Maybe I´m just misunderstanding you, but why do you say "DAC -> RPi -> DAC" when the routing is from the hifiberrys digital input to the hifiberrys analog output?

  • Ah now I know what you mean... I was confused because you refer to the hifiberry board as "the DAC", with which I thought you meant the DA converter on the board.
    I´ll ask on the hifiberry forum then - just not sure about how much KODI-help they are capable of giving, but thanks!

    EDIT: Ok, so I got a thumbs up at the hifiberry forum now, telling me that this is "the default profile" of this board to forward from Digital in to Analog out on the board itself. So you think I would not need to configure anything inside of libbreelec to make it work then?

    Edited once, last by jazzlpunk (October 23, 2020 at 6:17 PM).

  • On LE's audio settings you should see your DAC as new output device after driver activation. Maybe the menu will show multiple DAC output entries (profiles), and you can select a mixing or non-mixing profile.

    I don't have this hardware. The HiFiBerry forum can tell you more about those DAC profiles.

  • On LE's audio settings you should see your DAC as new output device after driver activation. Maybe the menu will show multiple DAC output entries (profiles), and you can select a mixing or non-mixing profile.

    I don't have this hardware. The HiFiBerry forum can tell you more about those DAC profiles.

    Thanks a bunch, now I´ll consider this my personal xmas-gift for 2020 :)