TorizonCore Setting Audio Levels: No Simple Control detected by Amixer

Greetings @anthonyabboud,

When running amixer in a container you need to specify the sound/audio card with the -c flag. For example, first of all take note of the sound cards on the Apalis i.MX6:

 0 [DWHDMI         ]: dw-hdmi-ahb-aud - DW-HDMI
                      DW-HDMI rev 0x0a, irq 274
 1 [imxspdif       ]: imx-spdif - imx-spdif
                      imx-spdif
 2 [imx6qapalissgtl]: imx6q-apalis-sg - imx6q-apalis-sgtl5000
                      imx6q-apalis-sgtl5000

The important things to take note is that for the Apalis i.MX6 the sound card we want is the last one imx6qapalissgtl and that the index of this is 2.

Knowing this, in the container you can do something like:

root@apalis-imx6-05228985:/home/torizon# amixer -c 2 set Headphone unmuted 100%
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [12.00dB] [on]
  Front Right: Playback 127 [100%] [12.00dB] [on]
root@apalis-imx6-05228985:/home/torizon# amixer -c 2 set PCM 100%
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 192
  Mono:
  Front Left: Playback 192 [100%]
  Front Right: Playback 192 [100%]

Using the -c flag we specify the sound card via it’s index (which is 2 as I said previously). As you can see by specifying the right sound card these commands now work properly. I then used aplay to play a test audio file to check and it seems to work. As a side-note you must also specify a sound card with aplay as well like so:

aplay -D sysdefault:CARD=imx6qapalissgtl sample-15s.wav

Best Regards,
Jeremias