Control the groups and switches in an audio mixer
mix_ctl [options] commands
QNX Neutrino
The mix_ctl utility controls the groups and switches in an audio mixer. For the source for this utility, see the mix_ctl.c example appendix of the Audio Developer's Guide.
The commands include:
For information about the syntax for the pattern, see fnmatch() in the QNX Neutrino C Library Reference.
Switch type | Value |
---|---|
SND_SW_TYPE_BOOLEAN | "on" or "off" (case-insensitive) |
SND_SW_TYPE_BYTE | An 8-bit value |
SND_SW_TYPE_DWORD | A 32-bit value |
SND_SW_TYPE_LIST | A list of 32-bit values to assign to the entries of the list |
SND_SW_TYPE_MULTI_SEL_LIST | Not supported |
SND_SW_TYPE_ROUTING_LIST | Not supported |
SND_SW_TYPE_STRING_11 | A string with a maximum length of 11 bytes. If it's found in the array, that entry is marked as selected. |
SND_SW_TYPE_WORD | A 16-bit value |
Running mix_ctl without specifying a command is the same as specifying the groups command without any additional arguments (i.e., mix_ctl displays information about all the groups).
List all the groups for card 0, device 0:
# mix_ctl groups "Master",0 - Playback Group "Input Gain",0 - Capture Group "PCM Mixer",0 - Playback Group
Change the volume for voice 0 in the Master group to 50%:
# mix_ctl group Master volume0=50% "Master",0 - Playback Group Capabilities - Volume Mute Channels - Front-Left Front-Right Volume Range - minimum=0, maximum=64 Channel 0 Front-Left - 32 ( 50%) Channel 1 Front-Right - 64 (100%)
List all the switches:
# mix_ctl switches "Headphone Select" BOOLEAN off "Loopback" BOOLEAN off
Turn the Headphone Select switch on:
# mix_ctl switch "Headphone Select" on "Headphone Select" BOOLEAN on