Crash when selecting USB audio interface

  • 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.

  • 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.

  • 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.

  • 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? :)

  • If JACK works, you should see JACK as an output device at Kodi settings. Not sure whether Kodi supports JACK. That's something to ask at Kodi forum.

    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.

    PS: I just did a test with my Ubuntu JACK system, and "JACK sink" is available as a Kodi output device.

  • Under the hood JACK is using ALSA (as that's the only way to access audio devices in Linux). So adding JACK to the chain is at best a workaround for some kodi bug.

    so long,

    Hias

  • Under the hood JACK is using ALSA (as that's the only way to access audio devices in Linux). So adding JACK to the chain is at best a workaround for some kodi bug.

    I've described my current theory at post #12. If I'm right, then JACK is not just an optional addition to the chain, but necessary to get any output channels for that specific device.

  • 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.

  • 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. :)

  • 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:

  • First: JACK is not our problem, because we don't use it on LE. However...

    a) I'm not sure whether RPi is capable to handle more than two JACK channels. Maybe overclocking is needed.

    b) To rule out processing issues, try a muli-channel JACK setup on a regular X86 PC first.

    c) Patchbox OS has a low-latency kernel, and JACK is pre-installed. Try it, they also have a forum.

    If you have more questions about JACK, open a new thread at Off-Topic section.