Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4410493imm; Mon, 14 May 2018 07:13:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoLinvqy8F6mQEVQlz8oM3wOHl+jQtd/1CbbvYuDMx4LtAjsGqQ9ZnD4O/zfWminkqQgXZR X-Received: by 2002:a17:902:9048:: with SMTP id w8-v6mr10087746plz.34.1526307189258; Mon, 14 May 2018 07:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526307189; cv=none; d=google.com; s=arc-20160816; b=Q6WKEXCJjSLEtatyL1dUJINwPfxCKGEHFHhugYVj8V3catQThrF1ySYmma79hJA6ex LEdH9wDfz4FQ84AsVL1a0tpsWlwC36BuKfKcQatSdnFprrAUnAdwq6REx2iaF8Qk0gXH Hm9b28BHsK7eKRgraMiVBafUKyrxOrvCEhwTC4KLNKcuGF4RPyJCd3R6Y2zCY7mWXVnr /ig4kMcKcRM27kXr7dmrPtoPFY6oZ5ArbSnGuhP7Ztc+eAjgMwJTzz899HPnmC3YV3ty SEhVPns4ItUFRSKKl9nCsfebEyyB3NS0Q5Z/qYh29JKQVW8cp5kciOW4owUsCUHWKJvV JFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=MudbaJ1g1lIRjpDBug9xEJ1s+YzdM3b/XScwUBB+zDc=; b=xK/jk0xoLMbvH4m8xVWQUhXnHXHjEp7ivTuLezBDFSirH2LHAr3u/J9Cum02N1LT11 GKT21rDF642GiY98hvLA9ulsAq5DSJEariVYw9ITyLIe1H216eHM71ORGFUaedA9E3X8 SPS8tiiSs0/75tTX5wkzV5CTaLmIrXZI/iLNHO5RTN41JND2zqqG9J2kkCmmJzeRkhXJ n4QH2dJu20IkJUTemCW31GCVZhThcusiqD3SuGBsCtiAasVbEw/DT7jwnjzft4xZ5RfS OuX0uH2HrxoGxod870eIHmEpNrQBwWvyIQBn0PwEG5ChfYWqKmPb7MmeD42jx8J3LPF0 GXgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9-v6si10695448pll.423.2018.05.14.07.12.55; Mon, 14 May 2018 07:13:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753858AbeENOLj (ORCPT + 99 others); Mon, 14 May 2018 10:11:39 -0400 Received: from mail.bootlin.com ([62.4.15.54]:50509 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbeENOLi (ORCPT ); Mon, 14 May 2018 10:11:38 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 390A8208B1; Mon, 14 May 2018 16:11:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 0D61E207AC; Mon, 14 May 2018 16:11:26 +0200 (CEST) Date: Mon, 14 May 2018 16:11:26 +0200 From: Maxime Ripard To: Danny Milosavljevic Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Andrea Bondavalli , Fabio Estevam , Icenowy Zheng , Philipp Zabel , Kuninori Morimoto , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v14 8/8] ASoC: sun4i-codec: Add Left Capture Select, Right Capture Select Message-ID: <20180514141126.mv7iso2d4xrfnsax@flea> References: <20180502210800.1971-1-dannym@scratchpost.org> <20180502210800.1971-9-dannym@scratchpost.org> <20180503145408.yymk2ndt4sm2yt4i@flea> <20180505124050.66f74999@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="udenmhxour2wcgz2" Content-Disposition: inline In-Reply-To: <20180505124050.66f74999@scratchpost.org> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --udenmhxour2wcgz2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 05, 2018 at 12:40:50PM +0200, Danny Milosavljevic wrote: > Hi Maxime, >=20 > On Thu, 3 May 2018 16:54:08 +0200 > Maxime Ripard wrote: >=20 > > > +static const char * const sun4i_codec_capture_source[] =3D { > > > + "Line", > > > + "FM", > > > + "Mic1", > > > + "Mic2", > > > + "Mic1,Mic2", > > > + "Mic1+Mic2", > > > + "Output Mixer", > > > + "Line,Mic1", > > > +}; =20 > >=20 > > Shouldn't that be defined in a more generic way? As far as I know, > > there's no way to tell what the difference between "Mic1,Mic2" and > > "Mic1+Mic2" would be from the userspace. >=20 > Sounds good - but how? >=20 > Here, "Mic1,Mic2" means the left channel captured is Mic1 and the right > channel captured is Mic2. >=20 > On the other hand, "Mic1+Mic2" means that the signals from Mic1 and > Mic2 are added together and that is captured (both as left and as right). >=20 > "Mic1" means both the left channel and the right channel captured is > from Mic1. Likewise "Mic2". Right, and my point isn't that it is difficult to understand or remember once you get it, but that it's difficult to get it in the first place, and that this convention is solely based on the one used in the datasheet, which is an abstraction violation in itself. I guess that's really up to Mark here, but one solution would be to allow to couple the controls explicitly instead of relying solely on the fact that they share the same controls array pointer. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --udenmhxour2wcgz2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlr5mQ0ACgkQ0rTAlCFN r3QsDg/9EdT0/2F7120H272q4Ar3OgoeKeo7tmox58o6moOKy1Do0r+5b9el4RrE p6eFZp0wBaY9HaiW4gGso9x7fLSV1bOlbuZUUDzfQKpzaBdmhEeRpypMlxqqdqoT 0oKCw0TGEduOTsdVAUn7UQsBfjyGsoac5ag1V6mUWas8E7ZT8ySJx5q4QX5zhTie nmTCGVXeFGjgS12ZVGhFKArf/zyF7ShPN2bPovVgYaLVAWwZx1JUXKm5XAu4po6o lNswFO8vDrgbyhJt0IaBnwTCzn2ikvKfhIX/9QLBsMFIU+6gMkxgyVUZY68UVG9F zm32dyF8OTm/rvf7ZLb0lexPIBVMeP7E6dguI9fMbP1y5wHAFrlWQQjyH79DCxsX tHbjuw19cDpaqBtYE/H2bFnBQNde8Z+RX1jnjTY0maZPKKPc0a+lmGE5Fll7lJ91 GEos2FLKKdvY9uIrYqGgyN2HEUyT3Qb/+oHVydmq6ZDNQm+mIfx95vdFaLvKq7Z1 urcBKxb5Lw7MRr8g++MYZkBs4JJDSigYn8i/ZzFZhL0NvBXNmQwGGSIUD95vN5Oz mAirCKcNHv1r3Fo9V3S8epBDk/HXAdCmTtOHAB+76lD/HYuRpWE+4eTfE7vgW+DY O6RX6Ji+IZfU7xQXYaW9Le9Ah8kfmvOBjRisJBoeNaObLSMpgfw= =hOx9 -----END PGP SIGNATURE----- --udenmhxour2wcgz2--