如何使用 amixer 命令管理输出设备?

如何使用 amixer 命令管理输出设备?

有两个输出设备:headphoneline out在我的电脑中。我可以选择其中之一作为输出设备PulseAudio Volume Controlamixer可以做同样的工作,例如pulseaudio

我想选择speaker播放card 1音频。

amixer -c 1 set "speaker" On 
amixer: Unable to find simple control 'speaker',0    
amixer -c 1 set "speaker" 10db
amixer: Unable to find simple control 'speaker',0

两者都无法工作。

@MC68020,无效命令:

debian@debian:~$   amixer -c 1 scontrols
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone+LO',0
Simple mixer control 'PCM',0
Simple mixer control 'Front',0
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Surround',0
Simple mixer control 'Center',0
Simple mixer control 'LFE',0
Simple mixer control 'Line',0
Simple mixer control 'Line Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Capture',0
Simple mixer control 'Capture',1
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Channel Mode',0
Simple mixer control 'Input Source',0
Simple mixer control 'Input Source',1
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0
Simple mixer control 'Rear Mic Boost',0
debian@debian:~$   amixer -c 1 sset Headphone  80%
amixer: Invalid command!
debian@debian:~$  amixer -c 1 set Headphone  80%
amixer: Invalid command!
debian@debian:~$  amixer -c 1 set "Headphone"  80%
amixer: Invalid command!
debian@debian:~$  amixer -c 1 sset "Headphone"  80%
amixer: Invalid command!

有关我的混音器的更多信息:

debian@debian:~$  amixer -v 
amixer version 1.2.4
debian@debian:~$  amixer -c 1 sget Headphone
Simple mixer control 'Headphone',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]

答案1

A/您可能更喜欢使用半图形 ncurses阿尔萨混合器公用事业。然后按照右上角的 F6 指示启动它以选择您的声卡,然后只需按下光标键即可设置您想要的控件的增益。

B/ 使用裸机混合器,由于您选择的控件对您的系统来说似乎未知,我建议您首先使用以下命令检查您的卡可用的控件:

$ amixer -c 1 scontrols

然后,使用以下命令在特定控件上设置您想要的增益:

$ amixer -c 1 sset controllabel 80%

为了设置这个特定控制的增益。

顺便说一句:不要附上控制标签双引号之间。


注意:任何控件都有不同的功能。这些功能取决于可能的设置。为了获取有关某些控件功能的信息,请触发:

$ amixer -c 1 sget some_control # adapt some_control

仅当控制获得以下值时,它才会接受更改增益体积能力。如果,如 OP 中详细说明的,它具有 pswitch 功能,则唯一提供的可能性是将其打开或关闭:

答案2

amixer -c 1 sget Master 
amixer -c 1 sset Master 90%

相关内容