Received: by 10.223.176.46 with SMTP id f43csp1843566wra; Thu, 25 Jan 2018 00:42:34 -0800 (PST) X-Google-Smtp-Source: AH8x2274rukhXoONYQkykVZoMfe5cohGS9OwbvbTFQdBVbDNlfVKRqln6xavJ73XOuMHUwK5F4wW X-Received: by 10.101.76.193 with SMTP id n1mr12059750pgt.194.1516869754620; Thu, 25 Jan 2018 00:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516869754; cv=none; d=google.com; s=arc-20160816; b=u8J6fULW0JuHY0lLeKmiRAyT0aiFbLSodu+YRSAfVaVVZP/f3L6sHIJnKyMhXiSVLu xq6CiPbduptLto8fcklqS3FfobhZLZXjLrpM7sXfKqQg0DV6SmZvjLKENmokuGlL006t tyxS7hZ+8G4LNMb9COaJgtqbxFWB5hvwdWoB58dc1EzBZ4rworeFo5vXvD/+eudsV2mm LmVM/i9/P7cvEkAxLWKI/rvLEqv92iw4RJSqW6tzhPnA88x+Rqmzc8D2f9ly+ZF1j6r6 FYe6J97qqT0SFsE2jTvUAF8VyaMCUgFlttF45hOZBcw1CfbndlT3UPjSYTI0zAXmLFiF EsEQ== 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=mZTuNSx+YnkMmFD81V3lL3SIw+/Ba4pIVLEbieBfYIk=; b=GdjgLQO05y4VQre7KtIMfwQVCuOUBUC8qEHcTmrvUBxBdsWa5sGeTvAUKNkcZ1ERmk Ymq6OmabZooGPMdeTIQl7reQ/YvqVZmuzb4GQxnYrlsP57X/BPdu4+gOtuQggn9x+uie VtWhycBXGTJi3hUHEHAdFzs7mGF0g1GVaQnlMZuqjqNnU6/gGpC99SVLaWvNZMRVx+cr f6IGrbEdc/+Fgi065ytYh/UovOIxA7CbTyaokhkk5p8hdsg9ytDKimSjKngYlk3zLlps JiKDWOjdN1B0jHWD8klQ0p63bWiXsn2tuoFiiT7mnVM/nq6K7zjELvOD/PqWTmT92lK/ n8GA== 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 8si4286967pfv.143.2018.01.25.00.42.20; Thu, 25 Jan 2018 00:42:34 -0800 (PST) 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 S1751413AbeAYIls (ORCPT + 99 others); Thu, 25 Jan 2018 03:41:48 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:39622 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbeAYIlr (ORCPT ); Thu, 25 Jan 2018 03:41:47 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 05FD7207CD; Thu, 25 Jan 2018 09:41:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED 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.free-electrons.com (Postfix) with ESMTPSA id C09AA20397; Thu, 25 Jan 2018 09:41:45 +0100 (CET) Date: Thu, 25 Jan 2018 09:41:45 +0100 From: Maxime Ripard To: codekipper@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, be17068@iperbole.bo.it Subject: Re: [PATCH 3/3] ASoC: sun4i-i2s: Add regmap field to sign extend sample Message-ID: <20180125084145.f4otos2kavo6rg7t@flea.lan> References: <20180124141101.12867-1-codekipper@gmail.com> <20180124141101.12867-4-codekipper@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x6khl46bbijbnw25" Content-Disposition: inline In-Reply-To: <20180124141101.12867-4-codekipper@gmail.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --x6khl46bbijbnw25 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Jan 24, 2018 at 03:11:01PM +0100, codekipper@gmail.com wrote: > From: Marcus Cooper >=20 > On the newer SoCs this is set by default to transfer a 0 after > each sample in each slot. Add the regmap field to configure this > and set it so that it pads the sample with 0s. >=20 > Signed-off-by: Marcus Cooper > --- > sound/soc/sunxi/sun4i-i2s.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > index 626679057d0f..9fda1240b717 100644 > --- a/sound/soc/sunxi/sun4i-i2s.c > +++ b/sound/soc/sunxi/sun4i-i2s.c > @@ -139,6 +139,7 @@ > * @field_fmt_bclk: regmap field to set clk polarity. > * @field_fmt_lrclk: regmap field to set frame polarity. > * @field_fmt_mode: regmap field to set the operational mode. > + * @field_fmt_sext: regmap field to set the sign extension. > * @field_txchanmap: location of the tx channel mapping register. > * @field_rxchanmap: location of the rx channel mapping register. > * @field_txchansel: location of the tx channel select bit fields. > @@ -164,6 +165,7 @@ struct sun4i_i2s_quirks { > struct reg_field field_fmt_bclk; > struct reg_field field_fmt_lrclk; > struct reg_field field_fmt_mode; > + struct reg_field field_fmt_sext; > struct reg_field field_txchanmap; > struct reg_field field_rxchanmap; > struct reg_field field_txchansel; > @@ -188,6 +190,7 @@ struct sun4i_i2s { > struct regmap_field *field_fmt_bclk; > struct regmap_field *field_fmt_lrclk; > struct regmap_field *field_fmt_mode; > + struct regmap_field *field_fmt_sext; > struct regmap_field *field_txchanmap; > struct regmap_field *field_rxchanmap; > struct regmap_field *field_txchansel; > @@ -358,6 +361,9 @@ static int sun4i_i2s_set_clk_rate(struct snd_soc_dai = *dai, > SUN8I_I2S_FMT0_LRCK_PERIOD_MASK, > SUN8I_I2S_FMT0_LRCK_PERIOD(word_size)); > =20 > + /* Set sign extension to pad out LSB with 0 */ > + regmap_field_write(i2s->field_fmt_sext, 0); > + Your commit log seems to suggest that it's only relevant for the newer SoCs (which ones?), yet you enable it for all the supported ones. Either the code or the commit log should be adjusted to be consistent with the other. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --x6khl46bbijbnw25 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlppmEgACgkQ0rTAlCFN r3R24g//Qq8Hn5WH2EmAF0N1pB5pL4T+mUcye47fpWjqEY8lA6nZToPlkkItkupj CFRty/jkjruX9ykuz5us0Sm9xXMi5ICb5vOlh7Bk4BIKxssqWaXnmMPN7XQhxYba zo/9Y/FvY1bqwhR52/oF2jStDplbQIVKKG5pAQG79IcyxvJAKXLGYUZU8JMJxNve mvNgVUQ/e5IdhWxgeEw/nJXdb2jzDEFgRfbQZb0SVPcBYRt1qrIWSnK1D8dVzCbs SYCfS6jSsS4CrynFvB5g6j0SNm6Yqqkf1rXw/vuyySRjQ1m5DWJ6JDsathsDaeiC B7lkt2hoQuxSh7nlzJ/UHLI2mwmhkgJOduJ2kzLD4q10SoVoaPKH44qH5oHbjpFU +OVoTPJDpvuhBBKyZMxfu4VNtR4Tl8nwv/YOiZkTHo6bKp7GSV3c3lDY9lMgj6vp wnaVlSeXICWF0sqNieNMIExbSvZ4+9OnHVh7VGC83eahjjg6FFv3BY/DpW3GIYK5 B88HMwMHvg3XiFMAFG2jdO7EiplwPZ4ukcKfliEVWgO+x21FE772J/jUL2/Zm03z j9F12CZqPetxQwLWFmN46K6retcnauKG91uBPUHDjuYPSTNAUpRjh1ptw2SqO27G oNE1jJHtC7EMGC8DAJ7qa9XwXQ0koh5XPywforMgRYl/piv7sgM= =zxor -----END PGP SIGNATURE----- --x6khl46bbijbnw25--