Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

Hi!

I just bought used TASCAM US4x4

It just works - and that is great. There're some issues:

- some cracking noize during CPU / IO intensive tasks running on PC
- a glitch when first used in every session (it's like it needs a second to warm up or something)
- low levels from microphone inputs? (have to turn the knobs to max to get close to that -18 with Reaper's controls in default position)

first two do not come as surprise (read about them while doing my research before the purchase) and I'll have to either learn how to address them or live with them for now

Input level is probably due to me having no understanding how to configure it yet.
(^UPDATE: this was b/c I connected mics to TRS (instrument) inputs instead of XLR, solved)

And this brings me to the immediate and pressing issue:

I cannot control this card with alsamixer / amixer.

Alsamixer shows just a couple of controls, that are grayed out.
amixer commands run but don't change the values.
I tried qashctl - it writes "operation not permitted" or something to STDERR when I move sliders there.

is this a normal thing for all external USB cards? Then how am I supposed to control them?

Of course (for recording, at least) I could start Reaper and set levels there

But I do most of the things command line (well, with shortcuts that run commands, of course):
Record with arecord.
Change volume with amixer set.
play music with mplayer
(which, by the way, cannot play anything with this card for some reason:
"[AO_ALSA] Unable to set format: Invalid argument
Failed to initialize audio driver 'alsa'"
"play" does play throught this card though, as do browsers, Reaper...)

So, what is the right way of working with these audio interfaces? (If I also using them as a PC sound card for all other purposes)

Are they supposed to be controllable by alsa somehow?

Or is there a way to achieve the same with some Jack tools?
(And somehow force browsers to use Jack?)

alsactl: may be irrelevant, but I read about alsactl somewhere, ran "man alsactl" and read this:
"If your card has features that you can't seem to control from a mixer application, you have come to the right place"
not sure if it applies to this case, but I wanted to try to store settings, update them and load back to card.

But

alsactl store -f /path/to/file <card id or number>

always saves controls of ALL available sound cards (and that's A LOT of conrols), regardless of the <card id or number> parameter

Thanks in advance for any advice

UPDATE: i think I figured out why mic signal is so low - I used jack inputs - just because I have mic cables with jacks on the other end LOL. Just read about that, impedance etc. and Tascam specs. and realized that I should only connect them to XLR. Cannot check right away b/c I don't have cables and it's night here.
Still no clue how to control the card programmatically.
Last edited by jaborandi on Wed May 18, 2022 12:24 pm, edited 2 times in total.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

another big problem is latency

this is pretty unexpected, I've never experienced latency issues on Linux even with built-in HDA INTEL card

but I've read on this forum that USB Audio drivers improved with Kernel version 5.14 so will report after an upgrade (I'm on 4.9.0-12-amd64 atm)

UPDATE:

lowering the block size in Reaper settings from default 2048 to 256 eliminates the outrageous latency, so it's even possible to play, but there's still some that shouldn't really be there when using hardware of this level.

setting block size even lower results in glitches

changing similar setting in card's control panel (from Windows) didn't help by the way

ok, I created backups and upgrading kernel, will update later
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

upgrading to Kernel 5.17.8 didn't change a thing
I'll check if it is any different in Reaper on Windows and update here

direct monitoring feature makes the latency problem almost irrelevant in many scenarios - almost, b/c you have to turn the knob between monitoring and playback each time... or keep it at 50% which means you have to increase the master volume and I'm not sure if quality is not affected if you always use card in this configuration

so I'm moving back to the problem of control and recording w/o Reaper (if Reaper can do it, I should be able too lol)

lol this thread became more like my log but hopefully it will end up with some useful info for others

UPDATE:

rec (sox) does work, I can record only first two inputs though, haven't figured out how to capture inputs 3 and 4 with it
Last edited by jaborandi on Tue May 17, 2022 7:42 am, edited 1 time in total.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

one thing actually did change with update to the latest kernel:
now alsamixer with brutal honesty tells me "This device does not have any controls" (:
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

mplayer works with sample size set to 32 bit

i.e. by adding this to /etc/mplayer/mplayer.conf:

Code: Select all

af=format=s32ne
UPDATE:

similarly, arecord works with these parameters:

Code: Select all

-c 4 -f S32_LE
And records all 4 inputs.

I suspect I should be able to set the format (32 bit sample size) in asound.conf, instead of specifying it for each individual application, but cannot figure out how, yet. This doesn't work:

Code: Select all

pcm.!default {
        type hw
        card US4x4
        format S32_LE
}
also trying to use alsa's softvol plugin. control appears in amixer/alsamixer, but doesn't work yet
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by merlyn »

There are a couple of points here.

-- alsamixer -- If there are no controls you can find another way to control volume in software. E.g. the volume control of mplayer.

-- S32_LE -- This is a 32 bit integer format. There's no point in using that as your hardware will be 24 bit. 32 bit float is often used inside a computer but generally software takes care of formats. Hardware uses 24 bit signed integer.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

Thinking about the question in the subject:

it actually makes some sense that a card that has a physical control of the master volume does not expose programmatic one to the computer. because, unless it turns the knob automatically when volume is changed LOL, the knob position doesn't determine the volume any more

a solution would be to either ditch physical controls like this altogether, or to remove limiters and make them "relative" knobs - without fixed 0/max. And, while future sure belongs to programmatic controls, I doubt that manufacturers would dare to remove or drastically change these familiar, core features any time soon
Last edited by jaborandi on Wed May 18, 2022 12:27 pm, edited 1 time in total.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

merlyn wrote: Wed May 18, 2022 11:58 am -- S32_LE -- This is a 32 bit integer format. There's no point in using that as your hardware will be 24 bit. 32 bit float is often used inside a computer but generally software takes care of formats. Hardware uses 24 bit signed integer.
thank you, I just noticed that default (16) didn't work and selecting 32 does, and assumed 32 is the correct one (:
I'll read more about it and try to configure it right

as to the volume - I want a global master volume control, trying to make softvol work atm (may be not a good solution, but at least a workaround)

UPDATE: just learned about low-latency kernel from Behringer thread, will try to install that
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by merlyn »

jaborandi wrote: Wed May 18, 2022 12:14 pm it actually makes some sense that a card that has a physical control of the master volume does not expose programmatic one to the computer. because, unless it turns the knob automatically when volume is changed LOL, the knob position doesn't determine the volume any more
What has happened is that the ALSA developers haven't implemented any control of the hardware. Some USB interfaces have controls in alsamixer, some don't. I tried out a Behringer 404 which had controls in alsamixer and a hardware volume knob. In this situation we now have two volume controls in series -- one software, one hardware.

Personally alsamixer is fire-and-forget for me. I put all the controls to 0dB and leave it, which is equivalent to having no controls.

It seems you are using ALSA directly. I don't know how you managed to avoid PulseAudio, but well done. :D Pulse offers a global volume. I don't like Pulse myself, and don't have it installed. I have a hardware knob for global volume.

ALSA is the old school way of doing things, and it's a while since I looked at ALSA in any detail, but I would think a global volume is possible. There is dmix which, IIRC, offers a mixer kind of functionality.
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by bluzee »

Personally alsamixer is fire-and-forget for me. I put all the controls to 0dB and leave it, which is equivalent to having no controls.
I'm the same with my UMC404HD. I opened up alsamixer once the first time I plugged in the device to make sure nothing was muted and have not looked at it again. I only use JACK with the UMC404HD. Pulseaudio runs on other audio devices.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

softvol works with the asound.conf below
but with big (close to 1 second) delay

Code: Select all

pcm.!default
	{
		type softvol
		slave.pcm US4x4
		control
			{
				name "Master"
				card US4x4
			}
	}
ctl.!default
	{
		type hw
		card US4x4
	}
pcm.US4x4
	{
		type hw
		card US4x4
	}
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

merlyn wrote: Wed May 18, 2022 1:02 pmWhat has happened is that the ALSA developers haven't implemented any control of the hardware.
yes, that's what I suspect
I tried out a Behringer 404 which had controls in alsamixer
I noticed people reporting that, but since Tascam otherwise works excellently, I decided it's better to try to help ALSA devs to add better support for it. (Even though, while dev myself, I'm new to alsa/kernel, would like to contribute also to try to learn about it more)
It seems you are using ALSA directly. I don't know how you managed to avoid PulseAudio, but well done. :D
Yes, no PulseAudio, thank you very much lol. No systemd and any kind of desktop etc etc either.
Devuan with XWindow and chrome is enough for me.
I have a hardware knob for global volume.
I have 2 - the speaker's one and the card's one - still not enough LOL when you're typing on the keyboard already and you want to adjust the volume, hot-keys are closer.
ALSA is the old school way of doing things
I understand but I like to keep things minimalistic. I do have to use DAW for mixing yet, but plan to change this as well.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

bluzee wrote: Wed May 18, 2022 3:55 pm I'm the same with my UMC404HD. I opened up alsamixer once the first time I plugged in the device to make sure nothing was muted and have not looked at it again. I only use JACK with the UMC404HD.
Does JACK have its own master volume control? Or you just use the mechanical knob too?
Thanks
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by bluzee »

Does JACK have its own master volume control? Or you just use the mechanical knob too?
Thanks
Jack server itself just routes between applications and hardware. The applications can have a software volume control or even be just a software volume control.

My standard practice is to leave all the ALSA mixer controls at unity gain. I use the hardware gain knobs on the USB device inputs to set the input level coming in to somewhere between -15dB and -20dB using jackmeter or the like. As the signal routes through applications, plugins etc. it gets adjusted as necessary in the applications and sent back out to the USB for playback at a low enough level to prevent clipping. I generally leave the main out level close to maximum but turn it down if it is clipping the mixer channel. The sound level I hear in the monitors is controlled by the main fader on the mixing board.

If I didn't have the mixing board in place then I would use the main out knob on the USB to control monitor volume. It could also be controlled by software volume application in JACK if so desired.
jaborandi
Established Member
Posts: 14
Joined: Sat May 14, 2022 12:03 pm
Been thanked: 2 times

Re: Tascam US4x4 (or any USB card?) - what is the right way to control (alsamixer/amixer can't?)

Post by jaborandi »

tried the jack_mixer and hooray, it works without delay!

Just need to figure out how to configure this or similar tool to work by default and in CLI
and also route all direct ALSA output (e.g. from browsers) through JACK
probably by this: https://alsa.opensrc.org/Jack_and_Loopb ... ack_bridge
Post Reply