Received: by 10.223.176.46 with SMTP id f43csp1864199wra; Thu, 25 Jan 2018 01:04:38 -0800 (PST) X-Google-Smtp-Source: AH8x2255+HYH3JuIMDs2mVInbMaHBMPa4h6BDxbH5teIWZpFwUVV0aLWSNo/YEkIunpSu6GaSr7p X-Received: by 2002:a17:902:b909:: with SMTP id bf9-v6mr11055445plb.218.1516871078375; Thu, 25 Jan 2018 01:04:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516871078; cv=none; d=google.com; s=arc-20160816; b=bL1ih+pkAYr/JYMZMYL/0bygl75ZK+A1WYNOhLiMamMw/LFzQ12NPuY9ofcxVGhRbQ Fs4QHRWIkwIxrAXCwBwXInzg/Hufey0V7U6tdeK/wH6wZpANOQ+SHR1vntVNG4q1H7X+ zcZLgTxOpqddO57aTjZVOdEdw7HyaJIJP4Ti+r7S9zDqlfImabNOLbqH2olt8gTHj4t7 cZKR/Il5v9XrN/woXaAOman+U4qh/QeP/D3izWCN+tKx2XIqdO8lvtEMzSwTMIxXFVCt 1TrdpBWpqo3pvSVO3152mQXJgJy4WGOY5BWLr6/ya1FvM92Pcry+4uRwpXzoAvupqCiy tm2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=B784jFSwnDlUZz3y04V0QEzmdKToGZ7NswIQm2k8d4c=; b=q0yNhCzAh6/kkP6Tq1EWtZBR5Lv/2Etw8ZP4GnPbD1mnaoZIIZKC7hMyfFhVZnpKgl nI/cmDy3Bj96I/mR5xfGYneY/b0en2D5sPOIgh38MtPzRsIW68izgUja1btweo54WfGy 7LulnKjVVXs1eEyNThnsE5eTsOydEr5MF/s1pLfCMOX4TizSji3NHCH5s2xd4hfPXKLg Z9W17lkfpcZXPoxGYBmZmtzL6JvaJ+Sb938ef1yWepsGjgQ9NzfMbwLzP/9uqCuN0yu5 vdeHH3y8MnOmlxn2yzvHr+fsdUvBnDW+HvFUAaNocincSR2V7BG6Sg67YXX8GhQ5bdcz ZS6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mYl5THup; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2-v6si1649077plk.235.2018.01.25.01.04.23; Thu, 25 Jan 2018 01:04:38 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mYl5THup; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbeAYJDz (ORCPT + 99 others); Thu, 25 Jan 2018 04:03:55 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:35018 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbeAYJDw (ORCPT ); Thu, 25 Jan 2018 04:03:52 -0500 Received: by mail-io0-f193.google.com with SMTP id m11so7900649iob.2 for ; Thu, 25 Jan 2018 01:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=B784jFSwnDlUZz3y04V0QEzmdKToGZ7NswIQm2k8d4c=; b=mYl5THuppOSg2wE/0w9626rJ7AFZ2lXYFT/Q4QK13mL6Vb9HUT5wU0MckmOFC8QPaA S49BEVKDwVjuz88We51DY3w0zLe7FWhPZgXSK7Zey5hDpU/XCuuLs0L/JIZcoRljX4S4 LD8KSulsI9Knv+e/gwdq/kZCejgom1n3MuyR0Xlu7HoanOto+3Qp+t0I8SAuNaczfRog +rYxdkTR9kMvDuI/XIq1luY5LRkn6LakoCCI9roD9O72HzIFwOzem5t2UKI0dnLCDeHs kA9+YiIlWLhN2eZ5xHUurIWNXMFbtd4quMe1C9EjbFfmC3jXQtjSdHqQnUDloqTBjUtv Krwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=B784jFSwnDlUZz3y04V0QEzmdKToGZ7NswIQm2k8d4c=; b=iYtECJi4OWh+dNrOU5pCO0t7mnOj5QNVo1bu4XwkNu7xGyQta7wkryWHPPffkZ3bR3 +mJ8BZVRG3LWX4jdVo2RnJEkDk30c00yIhlft5gFGbz7nMHgi2IZcPN9MN5U3yyE4hNM zOd1zBSZBFOYlTXAEqrosVw0IJJ9h3rh3bN4MtZGEiQdGMK01526v5rbmQQQy0UNGWlM 3f5XrU3XqXGHSwRao4orfDZvtFfxPz0ZrgojW68h/jffIZWE7RPVDAdL1lrrKmvZU+X9 cy9RKv4QMv6yq+g7xT7ROEBcGiRJzaG2Zw1Sh0rsq5CkG7CTNZ53kxCIklVKFcqkBEud vNyA== X-Gm-Message-State: AKwxyte6o4jmwtYVL8d9ccNcB5zIPHb6MCB3edeq2ED81x4UKLNaQV1x dr5H2Wm7VBCQh7hQiR4kR4ev1gXZKJ/zAGMdpyA= X-Received: by 10.107.43.87 with SMTP id r84mr11493249ior.53.1516871031953; Thu, 25 Jan 2018 01:03:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.213.129 with HTTP; Thu, 25 Jan 2018 01:03:51 -0800 (PST) In-Reply-To: <20180125084145.f4otos2kavo6rg7t@flea.lan> References: <20180124141101.12867-1-codekipper@gmail.com> <20180124141101.12867-4-codekipper@gmail.com> <20180125084145.f4otos2kavo6rg7t@flea.lan> From: Code Kipper Date: Thu, 25 Jan 2018 10:03:51 +0100 Message-ID: Subject: Re: [PATCH 3/3] ASoC: sun4i-i2s: Add regmap field to sign extend sample To: Maxime Ripard Cc: linux-arm-kernel , linux-sunxi , Liam Girdwood , Mark Brown , linux-kernel , Linux-ALSA , "Andrea Venturi (pers)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25 January 2018 at 09:41, Maxime Ripard wrote: > Hi, > > On Wed, Jan 24, 2018 at 03:11:01PM +0100, codekipper@gmail.com wrote: >> From: Marcus Cooper >> >> 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. >> >> Signed-off-by: Marcus Cooper >> --- >> sound/soc/sunxi/sun4i-i2s.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> 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)); >> >> + /* 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. ACK Thanks, CK > > Maxime > > -- > Maxime Ripard, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com