Problem running oram 2502.1 with RPI4, no kit with USB audio

Hi all, I’m using a very bare system as in the title - this used to work fine with older images but I can’t get it to work with the new image. It boots up fine but fails when I try to add an audio chain (appears to be because an index is wrong). If I use a dummy audio card it adds the chain OK. The USB audio adapter is a C-Media (1 input, 2 outputs) and I’ve selected the correct card number. Also, I have the hotplug disabled.

Display shows:
Failed to create chain

UI_log shows:
WARNING:zynthian_chain_manager.add_chain: list index out of range

Can I ask if anyone has tried any similar USB sound device? Anyone got any ideas what might be wrong.

Many thanks
Chris

Does it hang up and need rebooting as it tries to load a processor?

On the first attempt to add the chain it just fails with the message. If I try to add it again it hangs so I need to reboot.

It’s happened on two of my machines so far on Vangelis. Cured it by backing up, building a new ssd and restoring.

mmm, OK thanks. I’m currently using the stable image but I could try vangelis. I was wondering whether it’s something to do with the single (mono) input an maybe expecting stereo? Or maybe something changed when the hotplug USB code was added (pure speculation).

Thanks for your quick response.

I tried burning the image to a different SD card and also updating to Vangelis but these both behaved in the same way.

Ah ok.

I’m having a lock up problem with JV/3Band EQ & Dragonfly Reverb. Have you tried loading different processors? I just loaded a delay successfully onto the chain that has now hung. . . .

There is something in some processors that seem to trip it up.

I’ll report it.

It’s a pretty muddled error report so if you could add anything to it that would help .

I expect to be rudely told it’s all my fault very shortly. . . .

…Again.

…I tried 2 or 3 but they were all delay type functions. I’ll go back and try adding some other non-delay type functions. Maybe there’s something more in the debug log for my case - the standard ui log just showed an index out of range when doing an add chain. If I find anything I’ll post it.

I’m still finding my way around Zynthian so it wouldn’t surprise me if I’ve done something I shouldn’t have! :slight_smile:

I tried adding other non-delay effects chains and it (Vangelis) behaves in a similar way. The only concerning message I see in the ui log is the warning I pasted in my original post. However, I didn’t reflash the image after the initial failure, I just rebooted.

Hi, I decided to have a look at the code and the changes between the version that was working for me and the latest one. I came across some changes in zynthian_ui.py relating to the input capture ports. If I change these back then I don’t appear to get the problem. i.e.

code from 2502.1 (this fails for me)

    input_ports = zynautoconnect.get_audio_capture_ports()
    for i in range(0, len(self.audio_in), 2):
        a = self.audio_in[i]
        if a > len(input_ports):
            continue
        if i < len(self.audio_in) - 1:
            b = self.audio_in[i + 1]
            sources.append(f"^{input_ports[a-1].name}$|^{input_ports[b-1].name}$")
        else:
            sources.append(f"^{input_ports[a-1].name}$")

code from 2409.5 (this appears to work)

    for i in range(0, len(self.audio_in), 2):
        a = self.audio_in[i]

        if i < len(self.audio_in) - 1:
            b = self.audio_in[i + 1]
            sources.append(f"system:capture_({a}|{b})$")
        else:
            sources.append(f"system:capture_({a})$")

Now, I’m sure this isn’t a proper fix and I’m guessing it will break something that really needs those changes but maybe it is a clue as to what needs to be done.

Anyone, got any thoughts?

1 Like

I’m having the same problem, it’s hanging when adding a basic audio chain. I’ve just installed a new image, on the latest stable release, oram-2511.3.

I’ve changed my audio interface to a very basic Ugreen US205, which is a USB 1 in / 1 out 3.5mm audio jack. I can hear audio from instruments. Previously I was using a UMC202HD ok but this image doesn’t know about that.

Upon reboot, the first time I try to add an Audio chain, it comes back quickly and says it can’t and the log reports as below. The second time it just hangs on Adding Chain, with nothing new added to the log and no new process spun up.

Jan 21 07:37:44 zynthian startx[1119]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 1, delay: 18699.0us

Jan 21 07:39:18 zynthian startx[1119]: WARNING:zynthian_chain_manager.add_chain: list index out of range

Jan 21 07:44:19 zynthian startx[1119]: WARNING:zynthian_gui.busy_thread_task: Clients have been busy for longer than 30s: {‘add_chain’}

It’s also hanging on Remove All (when trying to start with a clean slate)

Jan 21 08:47:22 zynthian startx[2856]: WARNING:zynthian_gui.busy_thread_task: Clients have been busy for longer than 30s: {‘remove_chain’, ‘clean all’, ‘remove_processor’}

Added back the UMC and it’s working just fine. So it works with both in place, but not when only using the US205.

I’m fairly new to all this, but I had a similar issue regarding my USB audio interface. Since I couldn’t find any recent posts that were similar I figured this might be the best place to ask, but lmk if I should make a new thread instead.

I’ve got an iRig Stream Pro, and while Zynthian recognizes it, if I try to use it, no audio gets routed to it and it seems to be using all the system resources when set up in webconf as “Generic Usb Device”. Tried it with hotplug as well and the input and outputs show up but still doesn’t route any audio to the device (However, doesn’t seem to take the same toll on system performance).
Has anyone tried an iRig with Zynthian? Could this be fixable or is it a proprietary/compatibility thing? I would not have expected that it needed a special driver. I figured it was class-compliant, but I’m not sure how to find out.

Welcome @robothouseindustries. Have you tried selecting it on webconf from the detected devices rather than a preset config? There is a drop-down list of detected audio devices, just below the list of known/supported devices.

Yes. It shows up as “Pro”… iirc, I think I also tried it under the “custom device” setting (and also selecting “Pro” for the device) and it had the same issue.

I can’t see much info on the iRig compatibility with linux (ALSA). It sounds like it is recognised as a class compliant device because you are seeing it and able to get some audio through it. Why it uses so many resources is a quandary. I have a very cheap (couple of dollars) USB soundcard that is slow and tends to trigger xruns which may be due to slow USB interface and small buffers. It is a real challenge for anyone to diagnose low-level hardware issues without that hardware on their desk. I would start by selecting:

  • Soundcard: Custom Device
  • Driver Config : leave blank
  • Soundcard Device: select the sound card
  • Samplerate: 48000 (most soundcards work a natively at 48000, but try 44100 which some use)
  • Buffer Size: 256 (this can be reduced / optimised later when the sound is working)
  • Number of Buffers: 2 (this used to need to be 3 for USB devices but that should no longer be required - but might be worth trying if you continue to have issues)
  • 16-bit mode: Try with this enabled and with it disabled. It can help with some soundcards
  • Soft x-run mode: Try both, it can help mask issues with some soundcards
  • Jackd Options: This is automatically populated as you change the options above
  • Aubionotes Options: Ignore this - it isn’t really relevant to soundcard config
  • Mixer Controls: Click the button to see what zynthian has detected for available controls. Enable any that may seem useful, e.g. output level. These will appear on the alsa mixer view and allow you to control those parameters of the soundcard (device driver). You can also change the values right there in webconf. You may find that an input or output is turned down/off.

This may be a slow process because you need to reboot between each test. Be methodical, changing one thing at a time so that you see the effect (if any) of each change and how changes interact with each other.

2 Likes

Thank you, I will give it a shot! I tried changing a few of those params already but not as thoroughly. I appreciate it!