3

amixer has 2 groups of commands:

$ 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

Usually, I can do the same thing by using different commands, such as

amixer sset 'PCM' 144

or

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

Both of them can set the PCM's playback volume.

So what's the difference between the 2 groups of commands?(cxxx and sxxx)

Zoe
  • 27,060
  • 21
  • 118
  • 148
shadaszhao
  • 31
  • 1
  • 2

1 Answers1

2

The "controls" are the things actually implemented by the hardware.
The "simple controls" are an abstraction on top of that; this is what is shown in alsamixer.

Run amixer controls and amixer scontrols to see the difference.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • Yeah, the number of lines with the 2 commands are the same, I believe there is a correspondence between them. Will the number of them be different? In other word, why amixer provides the 2 groups of commands to finish the same work? Or there is something I don't know between the ways using the 2 groups of commands? Thanks!:) – shadaszhao Jan 09 '18 at 01:15
  • With most hardware, there will be differences. – CL. Jan 09 '18 at 06:07