Unlike elements and routes, mixer groups aren't
strictly dictated by the hardware.
You, as the driver writer, can decide on the number and contents of mixer
groups.
In order to build a useful driver, you need to create mixer groups
with a logical design that attempts
to satisfy the following conditions:
- Most audio applications deal only with mixer groups, since controlling elements directly
becomes quite complicated.
Therefore all major operations in your mixer should be controllable through mixer groups.
- The elements of a mixer group should control the same stream.
Building a mixer group with the PCM mute and the CD volume is possible,
but not really logical or useful.
- A mixer group should be associated with a PCM channel
such that an audio application can control the volume
with respect to the PCM channel it has open.
Your Audio HW DLL needs to provide a
snd_pcm_plugin_setup()
function that returns the associated mixer group.
For more information about this function, see the
Audio Developer's Guide.
- Capture mixer groups don't need to contain volume
or mute controls if control of the input selection is required.
In the above diagram, the PCM, MIC, and CD
capture groups would contain only the multiplexer element.
Another capture group would contain the input volume and input mute elements.
It's possible to make the PCM, MIC, and CD capture groups
contain the input volume and input mute elements,
but this would lead application developers
to believe there are independent volume and mute controls
on the these inputs, when clearly they're shared.