Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp691331pxx; Wed, 28 Oct 2020 14:38:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe2hJ8JMZvnKKEUWRqdvROFhjvfZgEBwk2NKOL/2UGAEZVjjKmx1Fy23sa+Jmli5LOz7xG X-Received: by 2002:a17:907:118c:: with SMTP id uz12mr1142338ejb.98.1603921115866; Wed, 28 Oct 2020 14:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603921115; cv=none; d=google.com; s=arc-20160816; b=DMZg4QCfn06UTLk8udbbB34JgYl62oUt82345oUv3Fh5TQ6TMAxMZSGB6DiY8j2KPl vsIJb2YhHzkAhQWCq9F50i6ZEiSzx1XvSLf82jrl+7umnZBXGspQhPn468hEj1/NqdyD ZhgpAER5xQoJBQDZMJFUeH2ndHumeUh9ES3I01uSDR6eV+5F0Ne7DyHDJjd94BmwTiqI DfpsnhUZpGQg7G8DLfhX2+SFOd3CIBVsUTZYmMUioYmOPZ/0/FNlytOEma/j/rDhqtTQ 6zQs0NLnreeoEdEE1MlwLGmjRnb3njG+F2yux1h34wTJN2y/lLp95gDvW0n5QDZAJJqA TjNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M4DMtRusIBSeOgDXKaZMtL3aNFUYRHrBj1yi1ElNljs=; b=P8cXYq9InCZVert2zb9kaRBN/wOFHIi9cAUUuToXQRyIw8rls6PNv16A4CrLo90tIg vujXRi4XpF8wbtF6LSWqTCls9STWxB39t5ImxiTA59Js9YU6S9/avqWZz0LINAzgzMor bGrVafDzHtFakqxaIa4xknnzVbPQZGmgA3/mIdNOPX2r933Z72FUugJSyjMW/SS9vM3g r7QDiG9WCSblfQ11lJFXnPiImckPLFv5f8+aAgjCPRYODSMVSbpskd6jS8qPta6M0Jo4 C8mMNXoYEn3u2FtyNh//7uh5JZXsGaRhYyv/92goTk1yKMoZ3mhCuQR8FyBfF9CXfnM8 mlZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e78D+C4Y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si628459edk.224.2020.10.28.14.38.14; Wed, 28 Oct 2020 14:38:35 -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=@gmail.com header.s=20161025 header.b=e78D+C4Y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S374349AbgJ0Vnk (ORCPT + 99 others); Tue, 27 Oct 2020 17:43:40 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:39590 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S374343AbgJ0Vnh (ORCPT ); Tue, 27 Oct 2020 17:43:37 -0400 Received: by mail-io1-f66.google.com with SMTP id p7so3202693ioo.6; Tue, 27 Oct 2020 14:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M4DMtRusIBSeOgDXKaZMtL3aNFUYRHrBj1yi1ElNljs=; b=e78D+C4YPOWMj2c9KFCPYCIg3bvAvcyQqVd3q0U9IzxX7aqpzFtPrfQOFokVNN1PNX XVrypVrbod4hLwzuZGhyHb/+PDmB3ar1be3vzd1WBJfTgQniWRrX8wn39wKbAhJQpN0A oWejHK6i+TG4BlPd+/oJEn1latxU4lUUd8Xv2e2G6Pa7x6z2WF7U8Ot8KajYAwiqxmb5 42vF/PLb6KUXH7JMRLIW1AeHyRBEqLvvmqbnLwPR3AkCXIvwbCLdl6AHUllzTiBbHgup lsgxRaktKlyNrDii/jNalYObBXJQKkUeLo44XP3oS1+49RWV5Hlj51ZCHgtr7+Iz9cNW 85wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M4DMtRusIBSeOgDXKaZMtL3aNFUYRHrBj1yi1ElNljs=; b=d6wzK8f/KvuLIuCFNCsY2VyxMtQ6KFHpjI83DbFaQ+lhGRi6F9X1d5Y0EobpMBCg37 VURxNkB8YsUwxiTQgK171QpDbhJcvgh/8FRx1eKvfR05oYF1eSQ6zEVgNkxJn54Xroli 9fSRRhYYFvHO438LQTJ3sBUzW8c2rvxXBd78TRXyT9a3CS0tHfA7aqhkY881kLUvOYbV eJPYZJEVR+iUrsd15XHGVF7MBXGYuvEF2zHjU37KYfzyNuv9KXo6p/fbaVSdepwX3AZ7 pfmImKBCYZqlHoMVMeOsw9LOdPfsuB7B3oP+OrGQHgjj+JgHrOZuK27o27q71K723pQj kE0Q== X-Gm-Message-State: AOAM530wOjVlL1t719NYD14kkEJ4ZSoNfJ7omfwqiOBMdIqZ5wjSqfOn nA48QcfP2KO0Qmh5rit8WsHY9qY6XJ7EybQz/iE= X-Received: by 2002:a6b:8b95:: with SMTP id n143mr3933217iod.36.1603835014568; Tue, 27 Oct 2020 14:43:34 -0700 (PDT) MIME-Version: 1.0 References: <20201027183149.145165-1-peron.clem@gmail.com> <20201027183149.145165-2-peron.clem@gmail.com> <01e34ad3-c695-c6eb-95dd-76c2cda77c6f@linux.intel.com> In-Reply-To: <01e34ad3-c695-c6eb-95dd-76c2cda77c6f@linux.intel.com> From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Tue, 27 Oct 2020 22:43:23 +0100 Message-ID: Subject: Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params To: Pierre-Louis Bossart Cc: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood , devicetree , Jernej Skrabec , Linux-ALSA , Samuel Holland , linux-kernel , Takashi Iwai , Marcus Cooper , linux-sunxi , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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