3

amixer有 2 组命令:

$ amixer -h
...
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 sset 'PCM' 144

或者

amixer cset numid=1,iface=MIXER,name='PCM Playback Volume' 144

两者都可以设置 PCM 的播放音量。

那么这2组命令有什么区别呢?(cxxx和sxxx)

4

1 回答 1

1

“控件”是硬件实际实现的东西。
“简单控件”是最重要的抽象;这就是 中显示的内容alsamixer

运行amixer controlsamixer scontrols查看差异。

于 2018-01-08T14:57:21.893 回答