From: Takashi Iwai Subject: Re: asihpi: Control naming Date: Thu, 30 Sep 2010 07:46:17 +0200 Message-ID: References: <4CA4078E.6010601@audioscience.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id C0494103916 for ; Thu, 30 Sep 2010 07:46:18 +0200 (CEST) In-Reply-To: <4CA4078E.6010601@audioscience.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Eliot Blennerhassett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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. >