amixer简介
amixer是命令行形式的配置指令,可以对ALSA(Advanced Linux Sound Architecture)架构类型的声卡驱动提供的接口进行音频参数配置,例如音量调节以及声卡开关。并且该amixer功能指令可以对多种类型声卡驱动接口进行配置。
另外注意还有alsamixer,作用和amixer一样,用于配置ALSA架构声卡各个音频参数,但是以图形界面形式显示,操作方便,显示直观。
amxier可以调节系统对应声卡的音量和选择音频通道。
amixer命令格式
使用 amixer命令如下:
amixer [-option] [cmd]
amixer支持的功能
终端下输入#amixer -h
查看amixer支持的功能和选项:
root@forlinx:~# amixer -h
Usage: amixer <options> [command]
Available options:
-h,--help this help
-c,--card N select the card
-D,--device N select the device, default 'default'
-d,--debug debug mode
-n,--nocheck do not perform range checking
-v,--version print version of this program
-q,--quiet be quiet
-i,--inactive show also inactive controls
-a,--abstract L select abstraction level (none or basic)
-s,--stdin Read and execute commands from stdin sequentially
-R,--raw-volume Use the raw value (default)
-M,--mapped-volume Use the mapped volume
Available commands:
scontrols show all mixer simple controls
scontents show contents of all mixer simple controls (default command)
sset sID P set contents for one mixer simple control
sget sID get contents for one mixer simple control
controls show all controls for given card
contents show contents of all controls for given card
cset cID P set control contents for one control
cget cID get control contents for one control
上述指令对于amixer功能只是一个简单描述输出,具体解释可以输入#man 1 amixer
查询。
自己理解的一些命令区别如下:
“controls”表示输出全部声卡驱动接口列表
“contents”表示输出全部声卡驱动接口列表以及对每个接口属性内容描述,接口的类型,值的大小
“scontrols”表示一些简单的接口的列表
“scontents”表示一些简单的接口的列表以及对每个接口属性内容描述,接口的类型,值的大小