Posts by lich000king

    Hi again

    Reported here.

    Experimenting with jack on raspios. Stereo seems to be working, kind of.

    Multi channel is driving me insane. Kodi seems to be making connections more or less at random, and dropping them even if 'keep audio device alive' is selected. The connections are also not correct, and sound seems to be coming mostly from the left side channel.

    Does anybody actually have kodi running with jack and multi channel?

    Googling jack mostly gives results about 3.5 mm jacks... :cursing:

    To my knowledge, nobody has compiled LE with JACK so far. The UMC22 is cheap, so a purchase could save you a lot of time.

    The reason I bought the 1820 is it has can output 8 channels via ADAT or analog.

    I want to play movies with 7.1 audio and forward that to some pro audio gear.

    If kodi is crashing on other Linux systems, too, then it'd be best to report it to kodi devs here: https://github.com/xbmc/xbmc/issues - this sounds like it might be a kodi bug.

    so long,

    Hias

    Thanks. I will do this.

    lich000king Can you try your audio interface on a regular x86 Linux PC, which has Kodi installed? Then you should also have the "JACK sink" output option. I'm asking because I'm unsure whether it's a JACK, or a driver issue.

    It works with jack in raspios.

    apt-get install kodi jack2

    then I have a jack output device in kodi and if I select it, I get output on the headphone jack of the Behringer.

    Also, when kodi is running, I get two additional entries from jack_lsp:

    alsa-jack.jackP1722.1:out_000

    alsa-jack.jackP1722.1:out_001

    First I thought I'd have to connect them to the system playback ports. However they seem to get connected automatically.

    That's great in a way, so I don't need to do it. Now I just need to find a way to have it make this default connection to the ADAT out pcm (and in a way that will play stereo to the first two channels, 5.1 to the first six and 7.1 all 8). Then I'm all set.

    Of course ideally kodi would do this by itself by letting me select the ADAT out on the device instead of crashing. I'll file a bug report for this.

    Hopefully I'm back on libreelec soon. :)

    Ok, tried xbian and kodi on raspios with similar results as on le. It seems kodi does not handle this situation.
    So I guess, for the time being, I'm stuck with jack.

    The order is starting the jack server, then start kodi then make the connections, right?

    Is there a way to start kodi and tell it which connections to make directly?
    And, while le does not support jack, has anybody successfully built le with jack and would share their config? :)

    Hi again

    Ok, I tried loading the asound.state file. Here is the output of alsactl info:

    Looks reasonable to me. I need card 2.

    When I load the file I get:

    Code
    $ alsactl restore 2 -f asound.state
    Found hardware: "USB-Audio" "USB Mixer" "USB1397:0503" "" ""
    Hardware is initialized using a generic method
    alsactl: set_control:1339: failed to obtain info for control #13 (No such file or directory)

    So it seems to be doing something.

    After issuing this command, and restarting kodi, the list of audioi devices looks the same, and le still reboots.

    Can you share the output of "amixer controls | paste" and "amixer contents | paste" ? .. You might need to --help and tweak the commands so they show the output against the USB device instead of the host system audio device.

    Here it is:

    amixer contents:

    amixer controls:

    Also see if you can restore this asoud.state config with alsactl .. rename without the .txt extension (needed else the forum complains of an invalid filetype). I found the contents in the Ardour forum. I am a long way from being a Linux audio expert, but I believe the root issue is that this is not a simple USB audio device and it needs a proper alsa conf to define its inputs/outputs. NB: Kodi only detects audio hardware at startup so if restoring the state file does something you will need to restart Kodi (systemctl restart kodi) for it to see changes.

    Thanks. I'll try that next and post back.

    The audio interface provides a ton of ins and out, without any standard, how to route them to a speaker system. I guess that's why the ALSA driver only provides an API for JACK. JACK is the expert for connection management.

    "aplay" makes an assumption about connections, and that worked. Kodi wants to do it right, and asks the driver for input channels. The answer is NULL (see post #8), because JACK should answer instead.

    My Behringer UMC22 has two ins, and two outs. In that case stereo routing is obvious, and that works for Kodi.

    I see. Would it be possible to write some config file for kodi so it will recognise the correct input channels, like an asoundrc file?
    That sounds easier to me than trying to build le with jack support.
    Also, even if the device does not fully report the channels available, it seems a bit extreme to me for le to reboot. Shouldn't there be at least an warning or something?

    Hi again

    Indeed, when the interface is plugged in, I can activate passthrough, and the 'spdif' device is automatically selected as passthrough device (and it's the only one available in the passthrough dropdown).

    However when I now select said spdif device as audio output, I get again a reboot.

    Or would it be enough to only activate passthrough, without choosing a different output device?

    Meanwhile, I also installed le 11.0.3 on a different SD and tested with that, just to be sure. The issue persists, unfortunately... (the only difference being that I now got a boot loop instead of just a reboot)

    Behringer UMC22 (ASIO conform) works fine here (RPi3B+). Which driver do you use at your music production OS? I bet it's not ASIO.

    ALSA. There is no ASIO for linux, is there?

    That’s good. You’ve ruled out a faulty unit so it appears it’s down to a kernel/driver issue in LE. I’ve tried many DACs with LE and I must admit none of them have had any issues working. When you hot plug the unit what are you seeing from dmesg output.

    This is what I get:

    Code
    [  130.109641] usb 1-1.1: new high-speed USB device number 6 using xhci_hcd
    [  130.200398] usb 1-1.1: New USB device found, idVendor=1397, idProduct=0503, bcdDevice= 1.00
    [  130.200432] usb 1-1.1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
    [  130.200446] usb 1-1.1: Product: UMC1820
    [  130.200459] usb 1-1.1: Manufacturer: BEHRINGER
    [  130.200470] usb 1-1.1: SerialNumber: 2F35E9FA
    [  131.144560] usbcore: registered new interface driver snd-usb-audio

    I made another test, the interface seems to work in le outside of kodi:

    And I can successfully play audio like this:

    Code
    aplay --device plughw:CARD=UMC1820,DEV=0 test.wav

    What does this mean?

    Thanks.

    Have you tried alternating USB ports when plugging in the unit, USB 2/USB3. Have you confirmed the unit is actually functioning as it should. Try powering on the RPI4 first then hook up the unit.

    So, it tried both USB2 and USB3 ports, it's the same.

    When I boot from a current raspios (Release date: May 3rd 2023, System: 32-bit, Kernel version: 6.1, Debian version: 11 (bullseye)) the interface not only doens't crash but actually play audio.

    Any difference if the device is connected before power-on/boot? (prob. not, but will ask anyway)

    Unfortunately not. It's exactly the same.

    Hi

    So I have le 11.0.1 running on a pi4/8GB. When I plug in my Behringer U-phoria UMC1820 USB audio interface, the system reboots...

    The u-phoria has a separate power supply and is supposed to work well on the pi (e.g.).

    It seems like the device is recognised all right. it's just when I select it in the settings as audio output device that gives the crash. I see two new entries, one 'analog' and one 'spdif' when the u-phoria is connected. Selecting either gives the same result.

    Code
    $ uname -a
    Linux LibreELEC 6.1.19 #1 SMP Sat Mar 18 20:58:05 UTC 2023 aarch64 GNU/Linux
    Code
    $ lsusb |grep BEHRINGER
    Bus 001 Device 003: ID 1397:0503 BEHRINGER International GmbH UMC1820

    lsusb

    dmesg

    lsmod

    kodi.log

    kodi_crash.log

    Somehow these logs don't seem to reveal much, at least to me.

    I also disabled bluetooth in the le settings, that didn't help.

    Has anyone seen something similar? Any ideas are appreciated :)

    Hi

    So this bug is still present in the current 9.2 beta.

    Basically, audio playback through remote has been broken across more than an entire major version cycle.

    Also, it seems to be not an rpi problem but happening across platforms (can reproduce on my nvidia shield).

    Any chance to get some motivated devs to fix this/how?