Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp914788pxx; Thu, 29 Oct 2020 18:33:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxycb+M+oLpAM5JnfNB2RgamFxVC8FCfLTC2qODrqA++yHeLTq+TH+5AGEW/NvaxH8auonb X-Received: by 2002:a17:906:3641:: with SMTP id r1mr133807ejb.405.1604021602565; Thu, 29 Oct 2020 18:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604021602; cv=none; d=google.com; s=arc-20160816; b=OivokHX/nhr/PhkHwJfRl/AaaM38s5er0WGtzAS213flANmuweSx4963P1VLoGedMR UiNe3MwkmQeP3yGWAhU33AWzm8kLaEjbazYO0xWMt0uEeumoWabAGCiYW0x0P63JMqzH zKbXXp1UWCGPC/OrQYgHkMrWtrthVCKP9NTYXZZ9bTcdpF+23tLD5NaMLZsNQ3wk8Q/m LgIswowm5abauPlgKAO2RNAdPOSuDR41TGDZhELJCjrn6Cd0z0ZxcLaeMOcV48VhZxuA u/P6kW9f+xhd6Rn4aKqoByYwI5PjcD58QweAGFqF++/UmWDyi+r/tkfsYrGHCisL04Mf NcUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=Vq44LRhd0cH+xqCv2R7hForse8RAqAQaEsvsIsJ8iBk=; b=LHDKQ033bR8jMklKWlEnfkyGW2npIhT0qgPVdpC5yvYcpFPcOMtObhVtMeXh2UFaQ9 NiBPsRywf1ICRJKyn0jCYzNFISYn0oSqPK1PZalc4P/sbDVrbmCgf/Y1Cbz6n5zT+bHe q4g6ZjI37zLOTn/EZMeI9K6Ax4aPEJ6JcbUs9CKpWyJlRz7+qW2TkU8AoedGhJugR3/m FY5ct1GhR2G5VEqCs3ofvRlYA5QiF5OKmY+G+ygVybBlK5BIJwS+dnRPGcXWoDYzOdcI ZbMXxczV+JHFFQqo3irtvekxJ+JeXfm5XWSROfuIXH5ZEFSi8Vvnmi6EkyIki8LZ3Lst +gqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=StWnN6Zw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=SbcACNp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si3243995eds.554.2020.10.29.18.33.00; Thu, 29 Oct 2020 18:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=StWnN6Zw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=SbcACNp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725922AbgJ3BbT (ORCPT + 99 others); Thu, 29 Oct 2020 21:31:19 -0400 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:37861 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbgJ3BbS (ORCPT ); Thu, 29 Oct 2020 21:31:18 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 348C3BF9; Thu, 29 Oct 2020 21:20:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 29 Oct 2020 21:20:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=V q44LRhd0cH+xqCv2R7hForse8RAqAQaEsvsIsJ8iBk=; b=StWnN6ZwMJzP37hNr oOTSqDI6L0nwxqtm9SpqaEbutuGs7ITQSwe+STVKnfmm3wqD8nYfsyOh4jub/p8B GERMppMgK4PvEAZBfB975NAZkfQlFnh0bqDXh82WWK1csOKAgFPpR0NneaTLWpjF pz7I8UySbiXzBStHicns9/Bzuxm16+5g1rw2nO5V2RQpCX0GaHNLj17P8dx6JuIb VU95zCt6Ogh9TJJB33/a8IOz8hB/177GgssdgsVI6NxjzpapCynhC8FuYmPHInQe dMFBVnHhVBYdI5P/C3CDVeJljBn8gBmoJeN0xqHCu34ZsBSTFmPQjqzT8jl+RmU3 lz4Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Vq44LRhd0cH+xqCv2R7hForse8RAqAQaEsvsIsJ8i Bk=; b=SbcACNp6tR/fIW7yWUNtd8hNq2Ye2p4sh4kmb33o46umgIBusm45igcwR wGQn2KQ7i8BOhDL2/xjUsmENiL/1Gm7fI4Fp5w0+lv4d4q4r4rNMgVL6+T5tc9V9 7AT6KEzaL/J+evvzu6RAguHw9CbLQpdYXU6kA4DZWmR+ibUd5eXwIaExvbRn0IHs Ynu9b6xZOvXXqmypDRiOaPJmUI+86Ma6q0PrkZmUegqmDLKokrroMato/M6cPeNu 1e3m+Xxs0xRuT08EOCHn1GxKB64UA6rpzrp9CRqO112mPKx0RgmYuCSDAjtkEwJe cU7/G0YJ55EwaVg+/mNJjnxZc2JJg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleeggdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpefgleekudevjedtjefhieelvdfhgeegieeikeelhfeffeffffffgedu teetleeijeenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh X-ME-Proxy: Received: from [192.168.50.169] (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C80B328005D; Thu, 29 Oct 2020 21:20:52 -0400 (EDT) Subject: Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params To: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Pierre-Louis Bossart Cc: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood , devicetree , Jernej Skrabec , Linux-ALSA , linux-kernel , Takashi Iwai , Marcus Cooper , linux-sunxi , linux-arm-kernel References: <20201027183149.145165-1-peron.clem@gmail.com> <20201027183149.145165-2-peron.clem@gmail.com> <01e34ad3-c695-c6eb-95dd-76c2cda77c6f@linux.intel.com> From: Samuel Holland Message-ID: <3f0c46e2-24a4-b6ee-1ea2-9de5344cfb9d@sholland.org> Date: Thu, 29 Oct 2020 20:20:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/20 4:43 PM, Clément Péron wrote: > Hi Pierre-Louis, > > On Tue, 27 Oct 2020 at 19:59, Pierre-Louis Bossart > wrote: >> >> >>> @@ -452,11 +454,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, >>> case SND_SOC_DAIFMT_DSP_B: >>> case SND_SOC_DAIFMT_LEFT_J: >>> case SND_SOC_DAIFMT_RIGHT_J: >>> - lrck_period = params_physical_width(params) * slots; >>> + lrck_period = slot_width * slots; >>> break; >>> >>> case SND_SOC_DAIFMT_I2S: >>> - lrck_period = params_physical_width(params); >>> + lrck_period = slot_width; >>> break; >> >> Aren't I2S, LEFT_J and RIGHT_J pretty much the same in terms of lrclk >> rate/period? the only thing that can change is the polarity, no? >> >> Not sure why it's handled differently here? > > I just had a look at the User Manual for H3 and H6 and I didn't find > any reason why LEFT_J and RIGHT_J should be computed in a different > way as I2S. Yes, and the manual explicitly groups LEFT_J and RIGHT_J with I2S when describing this field: PCM Mode: Number of BCLKs within (Left + Right) channel width. I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each individual channel width(Left or Right) So I agree that the code is wrong here. Regards, Samuel > Also the commit introducing this doesn't mention it. > 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats") > > I can't test it with my board but if nobody complains about it, I will > introduce a fix for this in the next version and change this also for > H6. > > Thanks for your review, > Clement >