[alsa-devel] asihpi: Control naming

Takashi Iwai tiwai at suse.de
Thu Sep 30 07:46:17 CEST 2010


At Thu, 30 Sep 2010 16:44:14 +1300,
Eliot Blennerhassett wrote:
> 
> Hi all,
> 
> I'm struggling with getting the correct names for controls, so that they
> show up correctly in the Playback or Capture modes of alsamixer
> 
> E.g. "PCM 3 Capture Meter" appears in the playback controls?
> 
> How is capture vs playback display determined?
> or to put it another way: What are the rules for creating control names.

The rule is simple.  The control name consists of three parts,
base-name, direction, and suffix.  The direction is either "Playback"
or "Capture", and the suffix is either "Volume" or "Switch".
Then the direction and the capture are omitted, and grouped together
with other controls with the same base name.
(There are a few exceptional cases, but in general the rule above is
 applied.)

"PCM 3 Capture Meter" is regarded as a playback control since it has
an invalid (unknown) suffix.  If it's "PCM 3 Meter Capture Volume",
in mixer, it'll become "PCM 3 Meter".  Also, you can (better to) use
an index for each control, so it can be expressed as "PCM Meter" with
index 3, too.


Takashi

> Here is a reduced schematic of one of our cards (in reality more
> channels e.g. 4 physical stereo ins and outs, 12 players, 8 recorders)
> All players and inputs are mixed to outputs.
> All inputs and players multiplexed to each capture.
> 
> How should all these controls be named?
> 
> 
>                                (1)-[vol]--+
>                                (2)-[vol]--+
> [play0]--[vol]--[meter]--[mode]--,-[vol]--+----[vol]-[meter]--[level]--[lineout0]
>                                  `-[vol]--|-.
>                                           | |
>                                  .-[vol]--' |
> [play1]--[vol]--[meter]--[mode]--'-[vol]----+--[vol]-[meter]--[level]--[lineout1]
>                                (1)-[vol]----+
>                                (2)-[vol]----+
> 
> [linein0]-[level]-\                     \
>                 mux>-[meter]-(1)-,-------|\
> [digitalin0]------/              |    mux >--[mode]--[meter]--[cap0]
>                                  |    ,../
>                                  |   |
>                                   `--|--\
> [linein1]-[level]-\                  |   >--[mode]--[meter]--[cap1]
>                 mux>-[meter]-(2)-----'--/
> [digitalin1]------/
> 
> notes
> [level] means calibrated reference level setting in dBu
> [mode] stereo channel modifier
> + summing junction
> --|-- wires cross, no join
> (1) connect from input to matrix mix output
> 
> thanks and regards
> 
> -- 
> Eliot Blennerhassett
> AudioScience Inc.
> 


More information about the Alsa-devel mailing list