command - 使用amixer时sset和cset有什么区别?

标签 command alsa amixer

amixer 有两组命令:

$ 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)

最佳答案

“控制”是硬件实际实现的东西。
“简单控件”是其之上的抽象;这就是 alsamixer 中显示的内容。

运行 amixer controlsamixer scontrols 以查看差异。

关于command - 使用amixer时sset和cset有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48148489/

相关文章:

linux - if 条件下的命令

ruby - 为什么这些代码行没有返回任何结果?

C++ 构建自定义定义

c# - 绑定(bind)到依赖属性,而依赖属性又绑定(bind)到另一个绑定(bind)源

linux - 用户空间中的 ALSA PCM 播放设备

linux - 如何在 VDS 上设置 ALSA?

ffmpeg - 没有使用 FFMPEG ALSA 环回录制的音频

php - 使用 php exec 和 amixer 设置音量