Behringer UMC1820 on Linux - maximum input level -57 dBFS.

pelanj

Registered
Thread Starter
Joined
Mar 1, 2019
Messages
5
Hi, I have a laptop with Linux Mint where I am running the previous major release of REW. I usually use UMIK and it works perfectly - as well as the internal soundcard both for FR and impedance measurement. I tried to set up two channel measurement using the UMC1820 sound card and ECM8000 mic. It works all fine with one exception - when the inputs of the soundcard are clipping (indicator LED blinks - so it receives the full voltage signal it can accept), the level seen in REW is around -57 dBFS - but it should be actually 0 dBFS. I am pretty sure that there is some simple way to fix this - either in Linux or REW options. If anyone recognizes this, could you please guide me where to fix this? Thanks in advance!
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
You should be able to see the input volume setting on the REW soundcard preferences.
 

pelanj

Registered
Thread Starter
Joined
Mar 1, 2019
Messages
5
That did not work, unfortunately - changing the value did not have any influence. But the issue was fixed by setting the input to 0 dB in alsamixer (and the volume control in REW disabled). The computer crashed when I tried to use the card for the first time in REW, so something went wrong in the mixer most probably. I did check all IO was set to 0 dB when I connected the card. I am sorry for the panic and thanks you for your help.
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
I'm running into issues again with this card in REWS. To get it to work the first time I had to remove all other sound cards from ALSA and set the mic level in alsa mixer.
When I bring up preferences, for output devices I see: "Default audio device, Pulseaudio Mixer, and UMC1820 [plughw1,0]. Input shows same. Setting both to UMC1820, Output is sometimes selectable and sometimes not. If not, you only get all the 5.1 named channels that make zero sense for this card. No matter what the Input pulldown is set to, you can only choose L or R. Trying to change the input or output device says unable to access the selected device.
REW V5.20.9 running Private Build JRE 1.8.0_312 64-bit on linux 5.4.0-122-lowlatency Locale: language en, keyboard US, UTF-8 at 100 DPI

Message:
javax.sound.sampled.LineUnavailableException: PulseAudio Mixer has no lines available supporting PCM_SIGNED 48000.0 Hz, 32 bit, 6 channels, 24 bytes/frame, little-endian

I'm sure this is a result of the sorry state of Linux sound in Java.
 

phofman

Member
Joined
Jun 26, 2019
Messages
133
Let's stay in this thread as it's card-specific.

I would suggest to make sure the device runs fine with basic alsa utils, without REW. Once the properly working combination of rate/channels/samplesize is established, we can look at what OpenJDK or alsapcm can do with it.

For measurement purposes only direct access to the card makes sense, at its hardware capabilities. That is alsa access, can be through plughw (OpenJDK) or some limited device in .asoundrc (alsapcm), we will see later.

The very first step should be disabling the device in pulseaudio (GUI pavucontrol, terminal pacmd set-card-profile ). Actually having a device enabled in pulseaudio is the most common cause of devices being randomly available in alsa access (not through pulse or default = pulse alsa devices) because PA regularly opens the enabled devices, blocking access to clients using direct alsa (no mixing available). It's nothing to blame PA, it's just doing its job and cannot know that a user wants to use the device otherwise.

What do you mean specifically by "the computer crashed when trying to use the device"? Did kernel get stuck?

For this quite tricky device I would recommend to upgrade to Mint 21 with kernel 5.15, and update the kernel to the highest version available for ubuntu if possible. If the laptop has Intel graphics, no special nvidia graphics drivers by DKMS should be required and the latest kernel should run OK.
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
It runs absolutely fine with Alsa, Jack, or any non-java-sound system in Linux - I use it daily with Ardour, Musescore and SonicVisualiser. I didn't say the computer crashed, I said REW crashed.

"pcm-default just crashes the program"
"If I allow it in pulseaudio mixer, using either pcm interface in REW causing it to crash with no output"

The program just exits.
 

phofman

Member
Joined
Jun 26, 2019
Messages
133
It runs absolutely fine with Alsa, Jack, or any non-java-sound system in Linux - I use it daily with Ardour, Musescore and SonicVisualiser. I didn't say the computer crashed, I said REW crashed.

Sorry, it was a post above yours by a different user. That makes it much easier.

IIUC there are maybe two unrelated problems. Making your card work in REW, and alsapcm possibly crashing java.

For the REW crash - please can you start REW in terminal (REW_DIR/roomeqwizard) and see if some error msg appears? Maybe the library segfaults, crashing whole java, I do not know. It should print something. Thanks
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
Removing the card from pulseaudio seems to prevent the app crash. I still get output but not input if I use UMC1820. Default, PCM: default, or Default device all generate no audio but show output/input/ref levels of -12, -13.93 dbu,-13.93dbu.

Starting it up using roomeqwizard (instead of the REW.desktop link which I'd been using prior) shows
~/REW$ ./roomeqwizard
OpenGL pipeline enabled for default config on screen 0
OpenGL pipeline enabled for default config on screen 1
Aug 02, 2022 3:01:08 PM roomeqwizard.RoomEQ_Wizard main
INFO: REW V5.20.11 running Azul Systems, Inc. JRE 1.8.0_342 64-bit on linux 5.4.0-122-lowlatency
Locale: language en, keyboard US, UTF-8 at 100 DPI
Aug 02, 2022 3:01:08 PM roomeqwizard.mC$1 paintComponent
INFO: Disabling use of BlendComposite due to internal error, waterfalls will not show overlaid cursor
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
setHWParams: Rate does not match (req. -1, got 384000)
setHWParams: Rate does not match (req. -1, got 384000)

Since it appeared to be looking for jack, I started it but roomeqwizard doesn't appear to utilize jack - perhaps just the underlying library supports it.

The other interesting but likely unsurprising bit of info given the lack of input in UMC1820 mode is that selecting it as the input device doesn't modify the Input: <default input> pulldown or the list of input channels (L,R) .
 

phofman

Member
Joined
Jun 26, 2019
Messages
133
Removing the card from pulseaudio seems to prevent the app crash.

Still it would be good to troubleshoot the issue. Maybe EBUSY in your case causes segfault, maybe something else.

I still get output but not input if I use UMC1820. Default, PCM: default, or Default device all generate no audio but show output/input/ref levels of -12, -13.93 dbu,-13.93dbu.

For practical REW purposes IMO you really want UMC1820 directly, not through pulseaudio (i.e. any form of default device). Either OpenJDK plughw:YOURCARDID, or some device defined in .asoundrc with e.g. fixed channel count (see below).

jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

That is just the jack plugin in alsalib initialization, nothing to worry.

setHWParams: Rate does not match (req. -1, got 384000)
setHWParams: Rate does not match (req. -1, got 384000)

This does not seem correct. setHWParams is called only from JNI nOpen, which is called by REW from java line.open(format)- with format where the rate is NOT_SPEFICIFIED (-1). Rate (all params) should be specified when opening the device, the formats with unspecified fields should not be tested. It does nothing wrong, just unnecessary.

The other interesting but likely unsurprising bit of info given the lack of input in UMC1820 mode is that selecting it as the input device doesn't modify the Input: <default input> pulldown or the list of input channels (L,R) .

How many channels will you need in REW? IMO you could configure a stereo device in .asoundrc and try the PCM: yourdevice . That will simplify selection of suitable parameters in REW because it will receive fewer possible formats. Something like:

Code:
pcm.rme2ch {
  type hw
  card "YOUR_CARD_NAME"
  device 0
  format S32LE or S24_3LE, whatever works for your card
  channels 2
}

Always good to test the PCM device before configuring in REW so that you know it works correctly by itself. Capture/playback at the same time (duplex), best using aplay/arecord --verbose --dump-hw-params for more details.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
The other interesting but likely unsurprising bit of info given the lack of input in UMC1820 mode is that selecting it as the input device doesn't modify the Input: <default input> pulldown or the list of input channels (L,R) .
That would indicate there is no port mixer for the device in the mixer list returned by JavaSound, those provide the lists of input and outputs. Your soundcard debug file did not include a port mixer for any devices, which is very unusual.
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
How many channels will you need in REW?

About four is actually good. Mic 1/2 cannot be removed from monitoring on outputs 1/2 - you can of course change the monitor mix knob. But for Ardour, et al, I run computer generated outs on 3/4, and use 1/2 so that I can route my front panel mics to a wedge speaker. I was using the PC soundcard out for pulseaudio but the jack is apparently damaged (I think 1/8" jacks are fundamentally weak points on devices left plugged in. Many jacks seem to use a coil spring tangentially across the ring, and these take a set after a while.)

In REW I run loopback test on 3 (it did work a few weeks ago - I think there must've been a pulse or java update recently). I'll try creating the mixer section - I just haven't needed it before, but it could help with putting pulseaudio on 3/4 anyway.
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
With pulseaudio allowed to utilize the card and PCM: Pulse selected:

Assertion 'uchunk->index % bq->base == 0' failed at pulsecore/memblockq.c:289, function pa_memblockq_push(). Aborting.
Aborted (core dumped)

Only I have ulimit set to unlimited and can't seem to find the core dump.
 

Attachments

  • rew_output.txt
    48 bytes · Views: 6
  • roomeq_wizard0.log.txt
    363 bytes · Views: 1
  • soundcard_debug.txt
    278.4 KB · Views: 4

natebow

Registered
Joined
Jul 19, 2022
Messages
13
Ok, after a daylong rabbit trail I have remapped the inputs/outputs:

# Remap Behringer inputs separately
load-module module-remap-source source_name=umc1820-xlr-1 source_properties=device.description=UMC1820-XLR-Input-1 master=alsa_input.usb-BEHRINGER_UMC1820_958E0CDF-00.multichannel-input remix=no channels=1 master_channel_map=front-left channel_map=mono

# Remap Behringer outputs separately
load-module module-remap-sink sink_name=umc1820-outputs-3-4 sink_properties=device.description=UMC1820-Outputs-3-4 master=alsa_output.usb-BEHRINGER_UMC1820_958E0CDF-00.multichannel-output remix=no channels=2 master_channel_map=rear-left,rear-right channel_map=left,right

# Make those the default
set-default-source umc1820-xlr-1
set-default-sink umc1820-outputs-3-4

This much is working and pulseaudio default output now goes out channels 3/4 (I wanted to do this because of the way the interface handles monitoring inputs). But it also proves that the map is working. At least the output. I can't seem confirm input yet. Alsamixer shows it's not muted.

pacmd list-sources|grep "name:"
name: <alsa_output.usb-BEHRINGER_UMC1820_958E0CDF-00.multichannel-output.monitor>
name: <alsa_input.usb-BEHRINGER_UMC1820_958E0CDF-00.multichannel-input>
name: <umc1820-xlr-1>
name: <umc1820-outputs-3-4.monitor>
pacmd list-sinks|grep "name:"
name: <alsa_output.usb-BEHRINGER_UMC1820_958E0CDF-00.multichannel-output>
name: <umc1820-outputs-3-4>

Back in REW, I'm not sure if I should be using "Default Device", "PCM: Pulse", "PCM: default", or "default [default]". I'm pretty sure to use the mapping I don't want to use "UMC1820 [plughw:1.-0" as that should be the raw ALSA device. REW can again send output, but receives no input. It shows it's receiving -49db on both in, and ref in (1 and 3) but this input never moves, and isn't tied to ambient noise level or even tapping on the mic which is clipping. I've no clue where the -49db is coming from as 'nothing' usually shows as -482.44 dBu.

pavucontrol shows applications recording as "ALSA plug-in [java]" when recording. I do get the output reflected back to the REW input levels in the check level dialog if I set pavucontrol recording to "monitor of UMC1820-outputs-3-4" but none of the inputs ("UMC1820-multichannel" or "UMC1820-XLR-Input-1" yield any observable input levels.
 

natebow

Registered
Joined
Jul 19, 2022
Messages
13
Finally got it working - input gain in alsa is distinct from mute - and if it gets muted in alsa, I don't see how to unmute at the pulseaudio level. I was looking for this, but missed it somehow.
 
Top Bottom