Subject: audio/mixer controls
To: None <netbsd-help@netbsd.org>
From: None <brook@biology.nmsu.edu>
List: netbsd-help
Date: 08/11/2004 12:18:40
I am porting an audio application (rat4) to NetBSD.  Its GUI provides
one output volume control, one input volume control, and one loopback
volume control.  I am mapping these controls to appropriate mixer
devices through a lookup table of possible devices; the first match in
the table is the device used for the GUI controls.

Not being completely familiar with all the manifestations of NetBSD
audio drivers, I am a bit unsure about what should be in the lookup
tables and in what order the entries should appear.  Currently, I am
using the following:

     static struct mixer_devices mixer_outputs_master [] = {
       { AudioCoutputs, AudioNmaster },
       { NULL, NULL }
     };

     static struct mixer_devices mixer_record_volume [] = {
       { AudioCrecord, AudioNmicrophone },
       { AudioCinputs, AudioNmicrophone },
       { AudioCrecord, AudioNvolume },
       { NULL, NULL }
     };

     static struct mixer_devices mixer_loopback_volume [] = {
       { AudioCinputs, AudioNdac },
       { NULL, NULL }
     };

Does anyone have any guidance for a plausible hierarchy of mixer
devices to try for each of the GUI controls?  

By the way, another similar application (using the OSS audio system)
maps the input volume control to the record.mic mixer device and the
output volume control to the set of {inputs.speaker, inputs.aux,
inputs.dac} mixer devices.

Any design suggestions are welcome, especially those that come with
some logical reasoning.

Thanks for your help.

Cheers,
Brook