snd_mixer_group_t

Mixer group control structure

Synopsis:

typedef struct snd_mixer_group_s
{
    snd_mixer_gid_t gid;
    uint32_t    caps;
    uint32_t    channels;
    int32_t     min, max;
    union
    {
        uint32_t    values[32];
        struct
        {
            uint32_t    front_left;
            uint32_t    front_right;
            uint32_t    front_center;
            uint32_t    rear_left;
            uint32_t    rear_right;
            uint32_t    woofer;
            uint8_t     reserved[128]; /* must be filled with zeroes */
        }       names;
    }       volume;
    uint32_t    mute;
    uint32_t    capture;
    int32_t     capture_group;

    int32_t     elements_size, elements, elements_over;
    snd_mixer_eid_t *pelements;
    uint16_t    change_duration;    /* milliseconds */
    uint16_t    spare;
    int32_t     min_dB, max_dB;
    uint8_t     reserved[120];      /* must be filled with zeroes */
}       snd_mixer_group_t;

Description:

The snd_mixer_group_t structure is the control structure for a mixer group. You can get the information for a group by calling snd_mixer_group_read() , and set it by calling snd_mixer_group_write() .

The members of this structure include:

gid
A snd_mixer_gid_t structure that identifies the group. This structure includes the group name and index.
caps
The capabilities of the group, expressed through any combination of these flags:
  • SND_MIXER_GRPCAP_VOLUME — the group has at least one volume control.
  • SND_MIXER_GRPCAP_JOINTLY_VOLUME — all channel volume levels for the group must be the same (ganged).
  • SND_MIXER_GRPCAP_MUTE — the group has at least one mute control.
  • SND_MIXER_GRPCAP_JOINTLY_MUTE — all channel mute settings for the group must be the same (ganged).
  • SND_MIXER_GRPCAP_CAPTURE — the group can be captured (recorded).
  • SND_MIXER_GRPCAP_JOINTLY_CAPTURE — all channel capture settings for the group must be the same (ganged).
  • SND_MIXER_GRPCAP_EXCL_CAPTURE — only one group on this device can be captured at a time.
  • SND_MIXER_GRPCAP_PLAY_GRP — the group is a playback group.
  • SND_MIXER_GRPCAP_CAP_GRP — the group is a capture group.
  • SND_MIXER_GRPCAP_SUBCHANNEL — the group is a subchannel control. It exists only while a PCM subchannel is allocated by an application.
channels
The mapped bits that correspond to the channels contained in this group.

For example, for stereo right and left speakers, bits 1 and 2 (00011) are mapped; for the center speaker, bit 3 (00100) is mapped.

min, max
The minimum and maximum values that define the volume range. Note that the minimum doesn't have to be zero.
volume
A structure that contains the volume level for each channel in the group. You can access the values accessed directly by name or indirectly through the array of values.
If the group is jointly volumed, all volume values must be the same; setting different values results in undefined behavior.
mute
The mute state of the group channels. If the bit corresponding to the channel is set, the channel is muted.
If the group is jointly muted, all mute bits must be the same; setting the bits differently results in undefined behavior.
capture
The capture state of the group channels. If the bit corresponding to the channel is set, the channel is being captured. If the group is exclusively capture, setting capture on this group means that another group is no longer being captured.
If the group is jointly captured, all capture bits must be the same; setting the bits differently results in undefined behavior.
capture_group
Not currently used.
elements_size
The size of the memory block pointed to by pelements in units of snd_mixer_eid_t.
elements
The number of element IDs that are currently valid in pelements.
elements_over
The number of element IDs that were not returned in pelements because it wasn't large enough.
pelements
A pointer to a region of memory (allocated by the calling application) that's used to store an array of element IDs. This is an array of snd_mixer_eid_t structures.

The elements that are returned are the component elements that make up the group identified by gid.

change_duration
The number of milliseconds over which to ramp the volume.
min_dB, max_dB
The minimum and maximum sound levels, in decibels.

Classification:

QNX Neutrino