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.
Crash when selecting USB audio interface
-
lich000king -
September 2, 2023 at 1:32 PM -
Closed -
Thread is Resolved
-
-
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:
Code
Display Morenumid=6,iface=CARD,name='Coaxial In SPDIF Validity' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=5,iface=CARD,name='Internal Clock Validity' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=7,iface=CARD,name='Optical In ADAT/SMUX Validity' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=9,iface=MIXER,name='Mic Capture Switch' ; type=BOOLEAN,access=rw------,values=16 : values=on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on numid=10,iface=MIXER,name='Mic Capture Switch',index=1 ; type=BOOLEAN,access=rw------,values=1 : values=on numid=11,iface=MIXER,name='Mic Capture Volume' ; type=INTEGER,access=rw---R--,values=16,min=0,max=127,step=0 : values=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | dBminmax-min=-127.00dB,max=0.00dB numid=12,iface=MIXER,name='Mic Capture Volume',index=1 ; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0 : values=127 | dBminmax-min=-127.00dB,max=0.00dB numid=8,iface=MIXER,name='UMC1820 Clock Selector Clock Source' ; type=ENUMERATED,access=rw------,values=1,items=3 ; Item #0 'Internal Clock' ; Item #1 'Coaxial In SPDIF' ; Item #2 'Optical In ADAT/SMUX' : values=0 numid=1,iface=MIXER,name='UMC1820 Output Playback Switch' ; type=BOOLEAN,access=rw------,values=16 : values=on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on numid=2,iface=MIXER,name='UMC1820 Output Playback Switch',index=1 ; type=BOOLEAN,access=rw------,values=1 : values=on numid=3,iface=MIXER,name='UMC1820 Output Playback Volume' ; type=INTEGER,access=rw---R--,values=16,min=0,max=127,step=0 : values=127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127 | dBminmax-min=-127.00dB,max=0.00dB numid=4,iface=MIXER,name='UMC1820 Output Playback Volume',index=1 ; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0 : values=127 | dBminmax-min=-127.00dB,max=0.00dB
amixer controls:
Code
Display Morenumid=6,iface=CARD,name='Coaxial In SPDIF Validity' numid=5,iface=CARD,name='Internal Clock Validity' numid=7,iface=CARD,name='Optical In ADAT/SMUX Validity' numid=9,iface=MIXER,name='Mic Capture Switch' numid=10,iface=MIXER,name='Mic Capture Switch',index=1 numid=11,iface=MIXER,name='Mic Capture Volume' numid=12,iface=MIXER,name='Mic Capture Volume',index=1 numid=8,iface=MIXER,name='UMC1820 Clock Selector Clock Source' numid=1,iface=MIXER,name='UMC1820 Output Playback Switch' numid=2,iface=MIXER,name='UMC1820 Output Playback Switch',index=1 numid=3,iface=MIXER,name='UMC1820 Output Playback Volume' numid=4,iface=MIXER,name='UMC1820 Output Playback Volume',index=1
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:
Code
Display More# # Sound card # - card: 0 id: vc4hdmi0 name: vc4-hdmi-0 longname: vc4-hdmi-0 driver_name: vc4-hdmi mixer_name: components: controls_count: 4 pcm: - stream: PLAYBACK devices: - device: 0 id: MAI PCM i2s-hifi-0 name: MAI PCM i2s-hifi-0 subdevices: - subdevice: 0 name: subdevice #0 # # Sound card # - card: 1 id: vc4hdmi1 name: vc4-hdmi-1 longname: vc4-hdmi-1 driver_name: vc4-hdmi mixer_name: components: controls_count: 4 pcm: - stream: PLAYBACK devices: - device: 0 id: MAI PCM i2s-hifi-0 name: MAI PCM i2s-hifi-0 subdevices: - subdevice: 0 name: subdevice #0 # # Sound card # - card: 2 id: UMC1820 name: UMC1820 longname: BEHRINGER UMC1820 at usb-0000:01:00.0-1.1, high speed driver_name: USB-Audio mixer_name: USB Mixer components: USB1397:0503 controls_count: 12 pcm: - stream: PLAYBACK devices: - device: 0 id: USB Audio name: USB Audio subdevices: - subdevice: 0 name: subdevice #0 - stream: CAPTURE devices: - device: 0 id: USB Audio name: USB Audio subdevices: - subdevice: 0 name: subdevice #0 rawmidi: - stream: OUTPUT devices: - device: 0 id: USB MIDI name: UMC1820 subdevices: - subdevice: 0 name: UMC1820 MIDI 1 - stream: INPUT devices: - device: 0 id: USB MIDI name: UMC1820 subdevices: - subdevice: 0 name: UMC1820 MIDI 1
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.
-
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
-
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.
Yes, with NULL output channels (see post #8) it shouldn't reboot. Maybe a popup with "JACK missing" instead.
However, if official Kodi releases have JACK included, then it's maybe our task to avoid that bug.
-
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.
-
Whatever. You have your theory and I tried to explain some more details. Anyways I'm out of this thread.
so long,
Hias
-
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.
-
Congrats! Stay with RPi OS, and put Kodi on autostart. It's good enough for 7.1 audio.
-
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...
-
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.
-