Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757613AbcCURyu (ORCPT ); Mon, 21 Mar 2016 13:54:50 -0400 Received: from down.free-electrons.com ([37.187.137.238]:40942 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756851AbcCURyt (ORCPT ); Mon, 21 Mar 2016 13:54:49 -0400 Date: Mon, 21 Mar 2016 18:54:36 +0100 From: Maxime Ripard To: Danny Milosavljevic Cc: Mark Brown , Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , Liam Girdwood , linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] Re: [PATCH v8 2/2] ASoc: sun4i-codec: Add FM, Line and Mic inputs Message-ID: <20160321175436.GD30977@lukather> References: <20151221123148.1ab6480b@dayas> <20151221123416.51aa938e@dayas> <20151227182157.GI30359@lukather> <20151228040649.475a742f@dayas> <20160106220908.GE9631@lukather> <20160109164832.515d69b0@dayas> <20160312085222.226d89bf@scratchpost.org> <20160314104939.GL8418@lukather> <20160315105802.GN2566@sirena.org.uk> <20160319171336.6e16eb5a@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dyTp/pkqtoagvozp" Content-Disposition: inline In-Reply-To: <20160319171336.6e16eb5a@scratchpost.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3903 Lines: 112 --dyTp/pkqtoagvozp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 19, 2016 at 05:13:36PM +0100, Danny Milosavljevic wrote: > Hi Mark, >=20 > my question is whether it's possible to group together the left and > right channel into one selem, and also if it's possible to reuse > volumes then. For example: >=20 > For sun4i-codec Mic there's right now: > - Left Mixer Mic1 Playback Switch > - Left Mixer Mic2 Playback Switch > - Right Mixer Mic1 Playback Switch > - Right Mixer Mic2 Playback Switch > - Mic Playback Volume >=20 > If possible, it could also then be collected together as: > - Mic1 Playback: > Left Mixer Mic1 Playback Switch,=20 > Right Mixer Mic1 Playback Switch,=20 > Mic Playback Volume > - Mic2 Playback: > Left Mixer Mic2 Playback Switch,=20 > Right Mixer Mic2 Playback Switch,=20 > Mic Playback Volume [note: there it is again] >=20 > ... where each outer group (f.e. "- Mic1 Playback:") is a selem > (slider with two mutes in alsamixer). >=20 > alsamixer has support for seperate left and right channel muting so > it would cut down a lot on the number of visible controls. >=20 > But as you can see, Mic Playback Volume is also shared. >=20 > Is it possible to group them together like this? How? >=20 > Right now, while everything technically works, it's overwhelming to > use alsamixer with sun4i-codec as a user - you have to *scroll* for > quite a while. >=20 > Additionally, while I'm at it:=20 >=20 > There's one capture volume right in front of the ADC. Whatever it is > you capture, this tells you the gain for the ADC. But for some > inputs, there are additional preamps. Right now in the v8 patch we > don't distinguish between preamps and ADC gains (because I don't > think it's possible), although the user has to kinda distinguish > them in his head because for inputs which have preamps only the > preamp and the adc gain *together* specify the total gain in the > end. >=20 > E.g. in the hardware it's >=20 > Mic In -> | Mic Preamp | -> | ADC Gain | -> | ADC | >=20 > while in alsamixer it's: >=20 > [Capture Controls:] >=20 > | Mic Preamp | | Capture Volume | | xyz Preamp | | abc Preamp | | qrs = Preamp | > ^--- ADC Gain >=20 > Is it possible to somehow distinguish those in alsamixer? Do we want > to? As I recall it, we were mostly discussing the how to deal with the ADC muxer that muxes both left and right at the same time (so shared controls), but with different source on each channel. For example, some valid values are: 4: left channel Mic 1, right channel mic 2 5: left and right channel are Mic1 and Mic2 mixed As I understand it, you can have shared controls by sharing the kcontrols structure, but then, you can't different labels. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --dyTp/pkqtoagvozp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIbBAEBAgAGBQJW8DVcAAoJEBx+YmzsjxAgi1IP93SctWBvtwulfkoaCgcVsRkc a4a/rhuQpZJTb6oKSw/vN31gMh5X4IVRlIjYgXiCIDOdDPlb1LYcLVHUZsAdDyIf LcOKx39LOKnbT4+713BUuD6KWdhyzVWJEfhVRNa0hPyZx0zpH2jGVpgXsxNyX+/1 6KneT7/1P0JW2EzW9SGOy6DTN7EMK7wg283GpA5fkZsTUznXlIA1mSE2LfAxl5fg 59g2ZR9pzAkDhg+FWbadCQNsLTUEI4Wd4MtQsMbXsJdyZzrngbzEkDiJjwPsAaiL NoFDNUDwAyPy1f4h7Uj69LLrkOqO299FsjvK/As5Vyq+PWZDbV8yFhp/6nycZHP0 habQ8XWvy2NSYUfi+ifA0PejVtbWJ3vqeauBbNEMP+CZcXhg75wGBdAqEIdBJ0zZ TWnM8djoJ+hEHjnq6ZuGf/xhwJynIaPk6JUkQMxTiDe/84cAx1D74mObrzYXSaLU vU45T89IePRbKnrO/thcWfXSLcsgepYpirPgsJuW4nbsv8S/0PiR4E8/Lz00VNNf jGW4amlu/uvAB6Oj07sNVW0O+JyoAHYMOEvic0uMvm7zvCKyA8sGfEGMk8eKI/kl kZIh7fdvvRFeJ8mVyt7SQPNRlP5WrIkj0bm9SolWVQcvG8uUhJ5xt+cM777kHP/+ 32/Vm/cnaHZ+076HlP8= =iPe+ -----END PGP SIGNATURE----- --dyTp/pkqtoagvozp--