Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7500511ybp; Wed, 16 Oct 2019 09:33:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxdgbIjd8OVogSY5msbZHsPJJNO0lnSSNTLcBFdkGr1HGqApXr+7uQh7uB/SA6y0crxk7H X-Received: by 2002:a50:ee92:: with SMTP id f18mr41351090edr.56.1571243590743; Wed, 16 Oct 2019 09:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571243590; cv=none; d=google.com; s=arc-20160816; b=kiKAdFGuUH7Q4fX1a/SxezKzWPxLky5rsZizYSzIg3a1JQx1MBvwkmsij6N5AikjL1 Gi12wb2Q6yD4Vf6xZ/ptmGTbjXg1M3xd0X2RtrBSYUk+9WfJTAUi3W/zRvqUYQxIMrkj WM2SsI8DDyKfzKqYhoEfmIo/WfxQp4WwSTv1/hllh+lQaDbxDaww84ylZmLC0BkQ+EUO zVgTrrZOs14UiKScbqEJg01hucTCxe657Ud5d+SEiZVxPKY7F1v63JPLW7RSoZjgfQ5G KgqT7ETG6KXhNyz21jaaG0gpINumdR/9I9mrFRDXcvRlVC93hAk7vbWWTnGeNAi82YiH 1IqQ== 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:dkim-signature; bh=Iw8J0P0IDhZA0pqtjHDapxxU18Qj4MFZ3unjp4up+pM=; b=zZQ1rOY3s9zgRLPXn7nHLHJqY/qMe1MyZQ65O76XVBCtqAFca1lU01yp8AM6YowGs5 IGZoJ/d5iK3N3x4KBrWjtK+ZioGmnrRIYFyy4wCVawjWlonsCrv8Pg2pDX4Tz+sDMfXc WUotoOfLuvYxe8F9w+jvNdZUbeJ8cpTTVBfRsE9hB5wDzpc1iha2XVZUcO86KyOevfLd i4+k1PzNp0XB2h+Nh4HKrCgXwf8wVNrSTySJoGZuf2Fl886GzN6XTcxBtx8+kV89rznM dwNAD21ChH5ffv1x4uHexUbDL9A4b/Cp0EKPL0VWWqDJ7rt2QlNwrlhntgw8h06Bn3Ps 1/aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="x7w7DZ/g"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si16658809eda.285.2019.10.16.09.32.47; Wed, 16 Oct 2019 09:33:10 -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; dkim=pass header.i=@kernel.org header.s=default header.b="x7w7DZ/g"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394065AbfJPOxs (ORCPT + 99 others); Wed, 16 Oct 2019 10:53:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:34772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728706AbfJPOxs (ORCPT ); Wed, 16 Oct 2019 10:53:48 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4985F2168B; Wed, 16 Oct 2019 14:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571237627; bh=uc/PYalgTjzCCWhp6PA2rkYtBpjEkTRPLPZjqrQyptI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x7w7DZ/gRhixI5aXMMHU39O2Ro3sO/7sBmGkF+zzkpkPrptyR9+jc4MEcN7v509e9 Zg5kAUqeRoB9qzys+P36C2PI+bAfPTelA9JfB1RJB/FGqDk57u3ph7ZaakwdFs7iRm 2UxhvNWaIWWezJxjUZVD3w+9mEyjt/+qlNHsYyqY= Date: Wed, 16 Oct 2019 16:53:45 +0200 From: Maxime Ripard To: Code Kipper Cc: Chen-Yu Tsai , linux-sunxi , linux-arm-kernel , Liam Girdwood , Mark Brown , linux-kernel , Linux-ALSA , "Andrea Venturi (pers)" Subject: Re: [PATCH v6 2/7] ASoC: sun4i-i2s: Add functions for RX and TX channel offsets Message-ID: <20191016145345.ll2igr2j5zttosjj@gilmour> References: <20191016070740.121435-1-codekipper@gmail.com> <20191016070740.121435-3-codekipper@gmail.com> <20191016080653.3seixioa2xiaobd7@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jby4uz6cwklukmi6" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jby4uz6cwklukmi6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 16, 2019 at 10:25:29AM +0200, Code Kipper wrote: > On Wed, 16 Oct 2019 at 10:06, Maxime Ripard wrote: > > > > Hi, > > > > On Wed, Oct 16, 2019 at 09:07:35AM +0200, codekipper@gmail.com wrote: > > > From: Marcus Cooper > > > > > > Newer SoCs like the H6 have the channel offset bits in a different > > > position to what is on the H3. As we will eventually add multi- > > > channel support then create function calls as opposed to regmap > > > fields to add support for different devices. > > > > > > Signed-off-by: Marcus Cooper > > > --- > > > sound/soc/sunxi/sun4i-i2s.c | 31 +++++++++++++++++++++++++------ > > > 1 file changed, 25 insertions(+), 6 deletions(-) > > > > > > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > > > index f1a80973c450..875567881f30 100644 > > > --- a/sound/soc/sunxi/sun4i-i2s.c > > > +++ b/sound/soc/sunxi/sun4i-i2s.c > > > @@ -157,6 +157,8 @@ struct sun4i_i2s_quirks { > > > int (*set_chan_cfg)(const struct sun4i_i2s *, > > > const struct snd_pcm_hw_params *); > > > int (*set_fmt)(struct sun4i_i2s *, unsigned int); > > > + void (*set_txchanoffset)(const struct sun4i_i2s *, int); > > > + void (*set_rxchanoffset)(const struct sun4i_i2s *); > > > > The point of removing the regmap_field was that because having a > > one-size-fits-all function with regmap_field sort of making the > > abstraction was becoming more and more of a burden to maintain. > > > > Having functions for each and every register access is exactly the > > same as using regmap_field here, and the issue we adressed is not with > > regmap_fields in itself. > > > > If the H6 has a different register layout, then so be it, create a new > > set_chan_cfg or set_fmt function for the H6. > > The H3 and the H6 have a similar register layout but the issue here > is that sooner rather than later we would want to be supporting > multi-channel audio which requires the offset to be applied to each > TX channel channel select register(8chan PCM for HDMI requires 4 Tx > channels). Currently we're only using one. So, as it turns out, they do not have the same register layout? Maxime --jby4uz6cwklukmi6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXacu+QAKCRDj7w1vZxhR xbpWAQD9d7cqPH+6+SLdgcA51ULmYTV+ruv2fADxYhKJiST9+AD/UEhef7PZqkGw 6nq7Em4kSoD7ip5xtYFAHDOWzTFGUgk= =IAvd -----END PGP SIGNATURE----- --jby4uz6cwklukmi6--