【问题标题】:What's the difference between sset and cset when I use amixer?当我使用 amixer 时,sset 和 cset 有什么区别?
【发布时间】:2018-06-17 07:48:22
【问题描述】:

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)

【问题讨论】:

    标签: command alsa amixer


    【解决方案1】:

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

    运行 amixer controlsamixer scontrols 以查看差异。

    【讨论】:

    • 是的,2个命令的行数是一样的,相信有对应关系。它们的数量会不同吗?换句话说,为什么 amixer 提供 2 组命令来完成相同的工作?或者在使用两组命令的方式之间有什么我不知道的?谢谢!:)
    • 大多数硬件都会有差异。
    猜你喜欢
    • 1970-01-01
    • 2018-06-05
    • 2017-08-27
    • 2016-08-26
    • 1970-01-01
    • 1970-01-01
    • 2018-04-09
    • 2011-09-19
    • 1970-01-01
    相关资源
    最近更新 更多