From: Takashi Iwai Subject: Re: [RFC] Channel mapping API (take 2) Date: Fri, 07 Sep 2012 11:43:22 +0200 Message-ID: References: <1347009374.4213.29.camel@laptop> 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 mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 2291D2616AB for ; Fri, 7 Sep 2012 11:43:23 +0200 (CEST) In-Reply-To: <1347009374.4213.29.camel@laptop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Tanu Kaskinen Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 07 Sep 2012 12:16:14 +0300, Tanu Kaskinen wrote: > > Hi, > > One additional wish for the channel map API: functions for converting > between snd_pcm_chmaps and (machine-readable) strings. If channel map > information is added to UCM, the UCM code will have to parse the channel > map specifications, or if they are exposed as unfiltered strings to > applications, then applications will have to do the parsing. In either > case, having readily available functions to do the parsing would be > useful. Applications may also want to convert the chmap into a string > for logging purposes, for example. At least, I already planned to provide conversion functions between a channel and a string. One concern is that I'd need to give two different strings, in a short form like "FR" and a long form like "Front Right". For printing the whole chmap, I'd take only the shorter form so that it can be separated by space letters. Maybe I can provide a parser from a string, and in this case, also only a short expression will be allowed, I guess. Takashi