From patchwork Fri Oct 30 14:46:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11869883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FB49C00A89 for ; Fri, 30 Oct 2020 14:47:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D49D120724 for ; Fri, 30 Oct 2020 14:47:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JC/YCGlS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y2jToFx4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D49D120724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Q39hVTaTYwON7fAAdTjmbjezvRQ9UF4brZPUtSLO68=; b=JC/YCGlSJ4POHh5WMaQTebwlx hZS2cKzwfvxIITHaaHmKJ659TF4pbPuPtwT0VqrmHXDdyLa2m0ZIVMujFi5MpN1Y7S/2V/k/8HoiE V0Wy3g970SQ2E7DN1HiXVN+/bS7RydMafgpoA/0Sc6/Z3GlZb2/67EFPX4/TEiAnUDzGsdlHeCL+U U+U+RlizNGGRFnl1MIrfgjnNf4iNYoT4oW+wrn56t9tD6JWWcP3yTPUQNPu/m6ai3lL+ETEybzPxA 8Kzmex9hd0hRf+A3lAr5t8gnc8m3vLBykwfNAipOcUSObdd7dV+VvndaeadTiUAhp78c9rKK+f+Xz JTwqXLn/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgQ-0003aJ-9c; Fri, 30 Oct 2020 14:47:14 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgD-0003VU-8m for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:06 +0000 Received: by mail-oi1-x244.google.com with SMTP id s21so6928476oij.0 for ; Fri, 30 Oct 2020 07:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3qfHTl4VFh+ziVF8DZnZZxGvPiZ3kXKnx8+g/Z/rsTU=; b=Y2jToFx4AU4O8l6MTP1yj9T4elz5vBsHBjtqe1vd3QFHWL77In8VjsEzfP3I9Pso/e fCOKMPBOFqUWmuBJ8dMHE66athLBWQjlF/x1pLjV1/cIl2SagQ4rWpotjPeopAqdlUNq i79GbMe0/Pz5I8ELPNrEZMynblgiPRZirosjXMPA7TmyUDBIZ8RAFzo1t0zMOXkMNt8T CI/D6gwN3DeJH8B+xWYc22vRKg43yyAIFWayUuqvy2o/o5sb6EHe4twl+ugCF2l6H/us elkEQVvYHiobuIi6FwCfG7bvsHfPg1/SlzTkpHG+BAXuU46N9W0hK0LN604FvjUA2UmO LQ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3qfHTl4VFh+ziVF8DZnZZxGvPiZ3kXKnx8+g/Z/rsTU=; b=E7+n2VURVZAAR4HfRCygtKCf5HeZ0npfLLfoJUuBxBspp00loGeDixQ57uICiQ+1t1 4l8ORdikFhnQeDPUZXoiJGGhsveK+8Brm6KPkq1+wVgIy4+cfeVwoMVMbAx5BLnXVfH2 RQFji4j6AOn5hVAFsCVPNlFoJ99pYqmTX7Tua7yEX/ZN5B5JMZibDf9OLySUMUoI3BFF z1V/GWqxz18ej1AGkek7d7pk+6OD9K3Vw58qSvc3W8yl0ej+NBLt4TOcL1CSE99c8+ZR jMj02B7xKXOYei2I0IueXtAdZ8m0kFsoTM5/TD5UUNjEgj+8nb06ogl43EHEKM5siL7Y Z0eQ== X-Gm-Message-State: AOAM530QX+HwWhT4tdB30pYJ/OoQ3qbHRFolXyuwH5AIkN4AyAp0Yooh vGwgmEL3e2YgyUV1ygESoYQ= X-Google-Smtp-Source: ABdhPJyfZf1kd87pRrrExCJ+b3xLcL62oEsjZJ75v2VM8njyu9n+24QvJpIVGE41DcP5awZPD7qr/A== X-Received: by 2002:aca:3806:: with SMTP id f6mr1826285oia.66.1604069218304; Fri, 30 Oct 2020 07:46:58 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:46:57 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 01/15] ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode Date: Fri, 30 Oct 2020 15:46:34 +0100 Message-Id: <20201030144648.397824-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_104701_395957_03A1A7EF X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Left and Right justified mode are computed using the same formula as DSP_A and DSP_B mode. Which is wrong and the user manual explicitly says: LRCK_PERDIOD: 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) Fix this by using the same formula as the I2S mode. Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats") Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f23ff29e7c1d..a994b5cf87b3 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -450,11 +450,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_DSP_A: 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; break; + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_I2S: lrck_period = params_physical_width(params); break;