You are not logged in.

#1 2024-07-08 07:21:37

beast41514
Member
Registered: 2024-01-11
Posts: 44

[Solved] Can't change volume using amixer

Output of cat /proc/asound/cards:-

cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfc080000 irq 79
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc5c8000 irq 81
 2 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc5c0000 irq 82

Only card 2's  controls are editable in alsamixer and volume is changing as well using alsamixer. But when i try to when i use amixer to control the volume i get:

amixer set Master 10%+
amixer: Unable to find simple control 'Master',0

Output of amixer:-

  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

Output of amixer -c 2 contents:-

numid=15,iface=CARD,name='Headphone Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
numid=13,iface=CARD,name='Headset Mic Phantom Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=14,iface=CARD,name='Internal Mic Phantom Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=16,iface=CARD,name='Speaker Phantom Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=12,iface=MIXER,name='Master Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=11,iface=MIXER,name='Master Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0
  : values=60
  | dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=2,iface=MIXER,name='Headphone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=1,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0
  : values=0,0
  | dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=19,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
  : values=255,255
  | dBscale-min=-51.00dB,step=0.20dB,mute=0
numid=6,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Headset Mic'
  ; Item #1 'Internal Mic'
  : values=1
numid=8,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=7,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=39,39
  | dBscale-min=-17.25dB,step=0.75dB,mute=0
numid=5,iface=MIXER,name='Auto-Mute Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Disabled'
  ; Item #1 'Enabled'
  : values=0
numid=9,iface=MIXER,name='Headset Mic Boost Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=10,iface=MIXER,name='Internal Mic Boost Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=4,iface=MIXER,name='Speaker Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=3,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0
  : values=87,87
  | dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=18,iface=PCM,name='Capture Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
numid=17,iface=PCM,name='Playback Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR

Output of amixer -c 2 set 'PCM Playback Volume' 10%+

amixer: Unable to find simple control 'PCM Playback Volume',0

On running this "amixer -c 2 cset numid=19 10%+" the PCM control is getting reduced to 4 in alsamixer.

numid=19,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
  : values=26,26
  | dBscale-min=-51.00dB,step=0.20dB,mute=0

I know very little about how arch's sound system working, so i appreciate any help. Feel free to ask for anything from my side.

Last edited by beast41514 (2024-07-09 05:26:20)

Offline

#2 2024-07-08 19:17:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,038

Re: [Solved] Can't change volume using amixer

Normal and expected -- a HDMI card is a digital output and technically doesn't have a volume outside of what you configure on the HDMI (screen) itself. On a "normal" system  if you're using pulseaudio/pipewire you're strongly suggested to do all volume handling via pulse abstraction layers, i.e. in the most simple cases with pactl set-sink-volume or with a GUI like pavucontrol. If you stick to plain ALSA and want a controllable volume for HDMI you'd need to set up a softvol plugin, but if you're using pipewire/pulseaudio you should by large ignore ALSA controls and handle everything via pulse volume layers.

FWIW the correct control to handle with amixer in your case would be a combination of PCM Playback Volume and Master Playback Volume

amixer -c2 set 'Master Playback Volume',0 +10%

or so, but if you're actually using pulse/pipewire you should largely ignore those as mentioned.

Last edited by V1del (2024-07-08 19:21:33)

Offline

#3 2024-07-09 05:25:56

beast41514
Member
Registered: 2024-01-11
Posts: 44

Re: [Solved] Can't change volume using amixer

Thanks man, it worked with pulse audio. I don't know why i was making this task overly complex.

Last edited by beast41514 (2024-07-09 05:31:56)

Offline

#4 2024-07-09 08:52:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,038

Re: [Solved] Can't change volume using amixer

Your confusion is basically one of the reasons pulseaudio does it this way, when having multiple distinct controls on the ALSA side, pulseaudio will merge them together with some heuristics to provide you a single controllable volume. Sometimes that heuristic is wrong and you get weird behaviours (e.g. sudden volume jumps to loud or silent when moving past a certain volume threshhold) but if the heuristic works it will greatly simplify your handling of it.

Offline

Board footer

Powered by FluxBB