[Solved] Alsamixer only showing 6 in/out when 8/8 expected

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

[Solved] Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

I am upgrading my installation to a newer os version. Everything works on the old system, but I always migrate way in advance and create a migrations script to make it fast.

SUMMARY OF PROBLEM: Alsa identifies all the inputs and outputs of the interface and they are available for jack to route. However alsamixer only shows 6inputs and 6 outputs where it should be 8in 8 out.

Alsa recognizes my UMC1820 and doing F6 then F5 to list all inputs and outputs alsamixer only lists 6/6 inputs/outputs where it should be 8/8.
Alsa works great on the old system with 8/8 inputs/outputs

In this case clearly you cannot just set 6\6 in\out to max manually and then execute

Code: Select all

alsactl store
to make it permanent as you dont know if the remaining in/outs not visible are at max or not.

I know I had this problem a few years back but cannot remember how I solved it in Alsa.
Anyone can refresh my mind ?

On my new distro there is no alsaconfig it seems.
in /etc there is no /etc/asound.conf as I used to have
Anyone have an idea what this is about and how to fix it with the newer alsa?
Alsa used alsa-utils version (1.1.8-2).

I can vaguely remember that it has something to do with the sound.state file., but unfortunately I did not document the solution back then.

Here follows the relevant contents of the file for my interface.

Code: Select all

state.UMC1820 {
	control.1 {
		iface MIXER
		name 'UMC1820 Output Playback Switch'
		value.0 true
		value.1 true
		value.2 true
		value.3 true
		value.4 true
		value.5 true
		value.6 true
		value.7 true
		value.8 true
		value.9 true
		value.10 true
		value.11 true
		value.12 false
		value.13 false
		value.14 false
		value.15 false
		comment {
			access 'read write'
			type BOOLEAN
			count 16
		}
	}
	control.2 {
		iface MIXER
		name 'UMC1820 Output Playback Switch'
		index 1
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.3 {
		iface MIXER
		name 'UMC1820 Output Playback Volume'
		value.0 127
		value.1 127
		value.2 127
		value.3 127
		value.4 127
		value.5 127
		value.6 127
		value.7 127
		value.8 127
		value.9 127
		value.10 127
		value.11 127
		value.12 0
		value.13 0
		value.14 0
		value.15 0
		comment {
			access 'read write'
			type INTEGER
			count 16
			range '0 - 127'
			dbmin -12700
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
			dbvalue.2 0
			dbvalue.3 0
			dbvalue.4 0
			dbvalue.5 0
			dbvalue.6 0
			dbvalue.7 0
			dbvalue.8 0
			dbvalue.9 0
			dbvalue.10 0
			dbvalue.11 0
			dbvalue.12 -12700
			dbvalue.13 -12700
			dbvalue.14 -12700
			dbvalue.15 -12700
		}
	}
	control.4 {
		iface MIXER
		name 'UMC1820 Output Playback Volume'
		index 1
		value 127
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 127'
			dbmin -12700
			dbmax 0
			dbvalue.0 0
		}
	}
	
		control.8 {
		iface MIXER
		name 'UMC1820 Clock Selector Clock Source'
		value 'Internal Clock'
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 'Internal Clock'
			item.1 'Coaxial In SPDIF'
			item.2 'Optical In ADAT/SMUX'
		}
	}


Maybe someone had to fix this recently and can refresh my mind.
I will poke around in the state file and see irf I can fix it in the mean time

UPDATE:
I copied my sound.state file over from working alsa on the other distro, but I still have only 6 in/out in alsamixer when I restarted alsa.
So it seems the state file is a consequence of another config I havent found. The state file is seemihngly not the place to look.

This is clearly a display error in alsamixer as I see the correct inputs and outputs with jack
So this needs to be some alsa-mixer issue and not alsa per se.


Updated alsamixer (alsa-utils) to latest version 1.2.3 but it did not help either
Where else to get alsa mixer to display correctly?
Last edited by retnev on Sun Aug 02, 2020 4:53 am, edited 1 time in total.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by merlyn »

If all 8 channels are available in JACK then ALSA must know about them. It's very basic but are the other two channels off the right hand edge of alsamixer? If there is stuff off the right hand edge the alsamixer window has arrows pointing right down the right hand edge and the other channels can be seen by scrolling right using the arrow keys. Basic, but worth ruling out. :)
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

Here is a screenshot. I dont see any way to see more channels.
https://i.imgur.com/P7YJCbK.png

I think I see the problem.
I only now noticed that the newer versions of alsa-mixer bundled inputs together in stero pairs.
It was never like that.
That is unfortunate for an interface to have it done like that.
the output has some bundled and some not !

The stereo Mic pairs I dont buy either Mics are mono. Even if they bundled it together it still doesnt add up right

Do you have any idea how to unbundle the inputs so that each channel is represented by a single volume bar ?
This is annoying!
alsamixer should really be replaced with something more workable.
alsamixer is all botched up it seems.
Last edited by retnev on Sat Aug 01, 2020 9:36 am, edited 1 time in total.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by merlyn »

I see. You have actually got 8 channels there -- Mic Front, Rear and Side are stereo channels which makes 6, plus Mic Center and Woofer are mono making 8. I would then think Mic 1 is a master?

EDIT : You got it. I don't use alsamixer that often. I set it up, then rarely need to touch it.
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

Jeez it is a mess, but I guess you are right.

Dont know how I will untangle this mess.

Dont really need alsamixer as I use CLI to do everything anyway.

But the thing is completely broken and cannot be relied on it seems after this.

Unless you know how to untangle it, I would rather call and abolishment on alsamixer and call it a day.

Thanks for helping successfully .. as usual.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by merlyn »

You're welcome. :)

I had a bit more of a look at this. Slightly off topic, but ALSA is still kind of mysterious to me. It's like xorg.conf -- the less you have to do with it the better. :) I haven't touched xorg.conf for years and that's good -- it's all now put together to work. Similarly for most users they will never need to know about ALSA. When you start using Linux for audio, though, ALSA is bound to come up at some point.

I'm now using two soundcards -- one for JACK and one for desktop audio through ALSA. Sync, Xruns and alsa_in are not an issue here. I also have the snd-virmidi module loaded so it comes up as card 0, breaking the default card. So I had to go back into ALSA and sort that, setting the default card to card 1. It reminded me about the labyrinth that is ALSA. :)

More relevantly -- on my system when I'm using JACK alsamixer doesn't do anything! Here is my alsamixer :

Image

I muted everything, and set the levels to zero as an experiment. JACK still works -- I'm listening to it. alsamixer does affect levels on the built-in soundcard I'm using for desktop audio.

To get the highest quality audio possible gain staging is important. It's really a fancy word audio engineers use to mean 'put all the knobs in the middle'. :) If alsamixer is controlling levels then I would think that is in software i.e. divide all incoming samples by a constant and you don't want that.

A bit of experimentation will allow you to find the best combination of analogue and digital levels. It's possible that you'll find when you're using JACK alsamixer doesn't do anything.
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

I wished I could cut alsamixer out completely as you did and have sound just straight from alsa to jack.
Uninstalling alsa-utils did not work, but since you have that preferred situation I will have to dig deeper into it and make that work to remove it completely.
You are right that it is an unnecessary and possibly degrading intermediate step.

I am good at jack and have that down and run a really great sound routing system. Unfortunately alsamixer is always active and messes with things.
i dont use it anymore and just set levels by cli and file edits.
Alsa is the biiiig pain to deal with and generally where my problems appear, then pulseaudio. the latter I could work out with custom scripts.

In this case my problem I posted is a nothing burger really as Jack shows it gets the correct amount of io signals to/from alsa for my interface, but the headache is that alsamixer cannot be really used as a debug tool for levels after config file edits.
In my case if I have e.g. keyboard on input 1 of my interface and mic on input2 then alsamixer gives me both levels in a single stereo slider! Utterly useless.

I will try and completely remove the "mixer" sections in the sound.state file and see if alsamixer is not ignored. It might be a good idea to try.

Last night I found a nice replacement application for alsamixer which actually shows the correct i/o for my interface with each channels it's own slider while alsamixer is all screwed up with mixed stereo and mono channels and what not combining inputs into a single stereo slider.

I will find it again and post it if you are interested. At least it showed all the correct io on the same system, which clearly shows the decrepid state of alsamixer. Nice thing about it, is that you are sure if it is not running it cannot interfere with the signals, so it is great as a debug tool.
Last edited by retnev on Sun Aug 02, 2020 5:35 am, edited 1 time in total.
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

Hi merlyn,

Take a look at qashctl Soooo much better than alsamixer and it shows everything correctly which alsamixer botches up completely.
On my system it correctly shows all my adat too and every in/out individually and 18in 20 out, no sweat.
It shows exactly that all my file edits to get all 18/20 levels up to max worked, while at the same time alsamixer only shows the first interface and not adat.
I had to work blindly before I found it.

It is in my apt repo by default on MX.

So I found something that solved my alsamixer predicament and I now have a great debug too to either replace or show the effects of my alsa CLI file edits.

16 in and 16 out clearly shown as I configured it in the config files which incoludes my adat interface.


Image
Image

You can configure switches spdif clock sources, the main out volume etc. The full 18/20.
What a pleasure compared to this alsamixer joke of the exact same system, below which groups channels into (hillarious) stereo pairs ..and then sometimes it does and sometimes not in an erratic way.

Image

Thanks to all who helped. I figured out a solution myself, but you were all very helpful thanks.
I hope someone finds benefit from this.
The question is marked as solved.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: [Solved] Alsamixer only showing 6 in/out when 8/8 expected

Post by merlyn »

I'm glad you found a solution.

In defence of alsamixer -- for me it's fine for what it does. With the better laid out GUI you've found -- if it was me -- I would set everything at 0dB and leave it. :)

That's a good thing about Linux -- multiple solutions mean different users can find what works for them.
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: [Solved] Alsamixer only showing 6 in/out when 8/8 expected

Post by retnev »

That is exactly what I am doing,

Its not just a nice gui, it shows each in/out individually and not stereo'd which is completely troublesome for large audio interfaces with alsamixer and it actually shows all the io compared to alsamixer.
It is fast and clear to set your clocks and you even have a "switches" panel to switch certain channels off. Something alsamixer cannot do in a consistent fashion.
It clearly configures the state file as I am doing manually.
It really is a godsent to me.

I also checked and both qashctl and alsamixer performs the volume division operation way within 1 clock cycle, so nop latency added.
Generally with Jack, I had this discussion with developers long ago and if your pc is not a slouch Jack will execute all their operations within a single clock cycle. Mixbus e.g. will need a few cycles and plugins might add more latency.

Plugins e.g. in mixbus is the problem. They can spill cycles and add latency and therefore also x-runs. No guarantees there.

I run a full 18/20 io on a 24 core server with 64GB ram with a real time kernel and have exceptional low latency without x-runs.
I basically make sure all instructions in the train fit into a clock cycle or more practically, a total of, in my case, cycle of 2.8ms when all other delays are accounted for such as A/D D/A, daw etc etc
Post Reply