Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758004AbbEEKyH (ORCPT ); Tue, 5 May 2015 06:54:07 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50829 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757973AbbEEKxl (ORCPT ); Tue, 5 May 2015 06:53:41 -0400 Date: Tue, 5 May 2015 11:53:27 +0100 From: Mark Brown To: Richard Fitzgerald Cc: lee.jones@linaro.org, linus.walleij@linaro.org, gnurou@gmail.com, cw00.choi@samsung.com, myungjoo.ham@samsung.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, ckeepax@opensource.wolfsonmicro.com Message-ID: <20150505105327.GZ22845@sirena.org.uk> References: <1430493319-23808-1-git-send-email-rf@opensource.wolfsonmicro.com> <1430493319-23808-8-git-send-email-rf@opensource.wolfsonmicro.com> <20150504113943.GB15510@sirena.org.uk> <20150505092411.GA15549@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4OzcLsYxzreNWMPE" Content-Disposition: inline In-Reply-To: <20150505092411.GA15549@opensource.wolfsonmicro.com> X-Cookie: Your present plans will be successful. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v3 7/8] ASoC: wm8998: Initial WM8998 codec driver X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2346 Lines: 60 --4OzcLsYxzreNWMPE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 05, 2015 at 10:24:12AM +0100, Richard Fitzgerald wrote: > On Mon, May 04, 2015 at 12:39:43PM +0100, Mark Brown wrote: > > On Fri, May 01, 2015 at 04:15:18PM +0100, Richard Fitzgerald wrote: > > > + val = snd_soc_read(codec, ARIZONA_ASYNC_SAMPLE_RATE_1 + val); > > > + if (val >= 0x11) > > > + dev_warn(codec->dev, "Unsupported ASRC rate2\n"); > > ...some random other register. > ARIZONA_ASRC_RATE2 register can only have the values 8 or 9 and we don't > provide a way to set it to illegal values. That's trusting of future maintainers of this code, and it doesn't look great when bounds checking and validation code has some fairly obviously missing bounds checking and validation. > > > +static const char * const wm8998_inmux_texts[] = { > > > + "A", > > > + "B", > > Those are some fun input names... > ... that's what the mux positions are called and it seems nice to have consistent > naming for all similar muxes across channels and across future codecs. Like for > example to switch both muxes of a stereo input you set them both to the same > position name (both "A" or both "B") is clearer, and quicker to spot in a dump > of ALSA control settings, than having the two muxes set to different enumeration > strings that actually mean the same mux position. Equally when setting the muxes settings called A and B that's not really telling people what they do. --4OzcLsYxzreNWMPE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVSKEnAAoJECTWi3JdVIfQUWkH/iAm+V+tRy2vusGvhDMPVdg3 tYedikVyumurF5RLgPISiAv7mndeLSXb1R/Mhf/ugGMe4fZUkrE1CUGAI46TXX4K kPo/1qKN4V+Me7hEPTfMg1+KS9dgW1gjBgvDiIZrzRd79t8QQMpXolI3Xn+74h/6 qPRDCelHwXDro5joFm9yTk+RhxdOaM15tQSPMzn1qj5Lf8kS2cDmlG9nyVnExcc7 BeJT3bc9Z2w5BYGDFnSdkEw2difn2t983UjOZRVHlqRLv138bL6NlidnWMkfhP0a l0+9x0OWy3umKaJE5x8lynM0ZFNbK9t6oTTxjMSCrD0TzDENQc0f5HZLircReFU= =+uCo -----END PGP SIGNATURE----- --4OzcLsYxzreNWMPE-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/