Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1252176pxx; Fri, 30 Oct 2020 06:00:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn8io60210Ry0zBCnQOYHCRdvHi17o/2AAeVfeWDftWJTIBSEp27yA758d+NPMWO6ySNlS X-Received: by 2002:a17:906:3daa:: with SMTP id y10mr2303531ejh.23.1604062852488; Fri, 30 Oct 2020 06:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604062852; cv=none; d=google.com; s=arc-20160816; b=N5JsLZMzoxzpEeMjQB5IGoU6Q3OAx5wIPD+/so3zsiC+3t2OX+cc8jqrwMLVSSCgB6 dVnKJsYSjGeSHvLmcyKDZb0tdLlOE4UrpeW45pXjbpHTcckkqkxQ4Eetg2xgmFj7i1uH pe4x7vx6Xfbbn2zpWBfXg/G9/hpUxVAJ66OQ9vaVQiNG4C6qT3cAtUU2nQ2HGxlL+rCS 1gB6+yJgj1DulpyNZ3gcIDThoJJrpinIuexFuLoJ6xB1I5pkJZvkbkdxOesAR7QQDwCA ZpyORj9/9oxlnZaH8M+J8Cv86vJukzRx5g8EcDhuqJOVr8cQz+OQ5YV0RcSATbHwz5Dd ZUEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DEjwCz6RYcTNQfWnCWPDSlK+EiMHXu1I2qKUPcY2Sh4=; b=hsQu+vygYmYWpgnQ+3jaYfk8q26aFBKrF9KaPH4dwFJkHdcBrAihtNBbNcn8k/5udY JhiiazNgijBIOCt3XRjWkWKiIoN2OWJABc1Of1R0u8OLJMBx1fRBSLNMnXQcb9ASf/i/ iZiW44VdVTehj7DA66rB00DNoezg3vF8SRNMoTq8iGqz1RwzKiIrRGNpa6UpJFBOP5nN 8uKNyIcs/fTnxZ41+BTLkCBCVK1zm8JXcnX7QY1POaGoIHvWQLDyg9PJmeMZXay48SwI VXEu/8ohUvumN0bLeVQNbJqW4HEew9deUVeE04BAYehZnEcaeQPlipVMfyWD1svCf1pJ du5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HBlLv1td; 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 o3si4465469ejn.637.2020.10.30.06.00.26; Fri, 30 Oct 2020 06:00:52 -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=HBlLv1td; 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 S1726601AbgJ3M6W (ORCPT + 99 others); Fri, 30 Oct 2020 08:58:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbgJ3M6T (ORCPT ); Fri, 30 Oct 2020 08:58:19 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0056C0613CF; Fri, 30 Oct 2020 05:58:18 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id h21so7370212iob.10; Fri, 30 Oct 2020 05:58:18 -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:content-transfer-encoding; bh=DEjwCz6RYcTNQfWnCWPDSlK+EiMHXu1I2qKUPcY2Sh4=; b=HBlLv1td8ZGbbQpa0MJPMXQx1wDSoEh19ueH+HpLQn7HCeunMObf8TyVowEs6h3R1m iO4vu+D+ag+gypjHMSJ/h5TbRu/++9EMN4/xsfsDdMPaUZtE4oFglwtgR08CcW2G2AdX UmlQm9AfRndgv1zsgN3sTlb+QByMJzLQycWwoPdDgQWPlOLC+3cw/yAxHS9xGEcsfk25 oL5Gr2GsEfDIMPaQ/3v0cjoZYemL+EIxWgI9EmA1QEc1Kc55bB7q7X6z5rvkgrdV8Wln YUSHz2U73sjUjSPC7fP0Cum01fYXKZPtnwqJrgS23oaIaaD/6+9OjVGgGaguXxagZ3Lq 1xAw== 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:content-transfer-encoding; bh=DEjwCz6RYcTNQfWnCWPDSlK+EiMHXu1I2qKUPcY2Sh4=; b=EOHe3djSOCTuYt7jKFKoVMSvjUaO7l16O6M0jH9Difv6Wj7i4dqcGRbOWPGFbKMbOY GF4s+LdYuMzpyZHagCL/H68jaF7r0LaQCAQEOaenUfbd5BHyxpNxU4D9bOOYP0eEgIWA OO0DKzz1o/25/RdgWBjPSGqE/BtnM6X3besT2MOMiweyXwxvcgoQ9FDGX2ycTgae0bgy tLDzJE3LMIuyHO4qegzE3VtM+3/FCZf1ofebkxQ0rcTFUHqdEcB3jncNKQbmsSoIrg/X HdPf4K8m5oXpHhbSRLcjGBaKodwzKD6zTfWk7aidQv9u6N62wQBu0AB8VyOYIFwdXKUv yxxg== X-Gm-Message-State: AOAM5338qPaJy+A571akTDSoS2cVyE3yUdANhhCEIO1C8n9+q1mEs2BZ x1zmXUtB9XZk/8yvcCMvYuvQDtcJXcBFIuigCMg= X-Received: by 2002:a05:6638:1351:: with SMTP id u17mr1911170jad.120.1604062698162; Fri, 30 Oct 2020 05:58:18 -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> <3f0c46e2-24a4-b6ee-1ea2-9de5344cfb9d@sholland.org> In-Reply-To: <3f0c46e2-24a4-b6ee-1ea2-9de5344cfb9d@sholland.org> From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Fri, 30 Oct 2020 13:58:07 +0100 Message-ID: Subject: Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params To: Samuel Holland Cc: Pierre-Louis Bossart , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Samuel On Fri, 30 Oct 2020 at 02:20, Samuel Holland wrote: > > On 10/27/20 4:43 PM, Cl=C3=A9ment P=C3=A9ron 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 =3D params_physical_width(params) * slots; > >>> + lrck_period =3D slot_width * slots; > >>> break; > >>> > >>> case SND_SOC_DAIFMT_I2S: > >>> - lrck_period =3D params_physical_width(params); > >>> + lrck_period =3D 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. Thanks, I will send a fix in the v10. Regards, Clement > > 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 > > >