mix_ctl

Control the groups and switches in an audio mixer

Syntax:

mix_ctl [options] commands

Runs on:

QNX Neutrino

Options:

-a[card_num:]dev_num
The card number and mixer device number to access. The default for both the card number and the device number is 0.

Description:

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:

groups [-d] [-c] [-p] [pattern]
Display information about all groups, or the groups that match the optional pattern. The options include:
  • -d — display the group details.
  • -c — show only the groups that are effecting capture.
  • -p — show only the groups that are effecting playback.

For information about the syntax for the pattern, see fnmatch() in the QNX Neutrino C Library Reference.

group name [mute[Y]=off|on] [capture[Y]=off|on] [volume[Y]=x|x%] ...
Change the setting of the group with the given name. Be sure to quote the name if it contains white space. The zero-based voice number, Y, is optional and restricts the change to the specified voice (if possible).
Note: If you specify the voice number, don't put it in square brackets.
switches
Display information about all the switches.
switch name [value]
If value is specified, modify the switch with the given name. Whether or not value is specified, display information about the switch. What you can specify for value depends on the type of the switch:
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).

Examples:

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