From patchwork Thu Sep 3 20:30:17 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: 11754717 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A49A746 for ; Thu, 3 Sep 2020 20:31:26 +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 D286620678 for ; Thu, 3 Sep 2020 20:31:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KHJa1EaZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z299lBM+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D286620678 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+patchwork-linux-arm=patchwork.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=lCaqgldMr2EseAJjSaErWyEpZmhQJd4vcvbVOKA5Aqw=; b=KHJa1EaZYCqVtlT9yroYGsoTs QgLm8vy0pqdVcLKkYuQ7Pmf7zZJMYm5IqJ20vn4mA4pzL/JKBnySMZCvt5BBHCrOxEb2Tlh/2AFgX C57UdT47OdkQXoy1wPehPJvO1PkS4Jkn2A7UUbCy5aHrSZgU76KnRJGUrSiYrXsfH8D/ErBylLSL5 ehpw35jid8UR3Zl/B3CZZTcSiTMFHSHbZHK/uNxo3KQAPP7XH4Q0jelTRmbdrg23wO0lik433VQFy vIGfU8zYl0vyP0yz3NlVTa5+afkRnGZnQM2CR/TFtiUVOpuOegKuEbwNdZdBWuKm0kTaWTRvEuzjn M/KxdRWNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDvsz-0004WH-0X; Thu, 03 Sep 2020 20:31:09 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDvse-0004NF-HS for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 20:31:00 +0000 Received: by mail-wm1-x343.google.com with SMTP id v4so4121614wmj.5 for ; Thu, 03 Sep 2020 13:30:48 -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=EGc0yXuTiDFTGIiyB8RKG2RROl6pKeDEVLqeD/qlySQ=; b=Z299lBM+zeS6T63IlyOyPftevP++hmKvFRve7cd4JLiV0g+AYfED1OpJPoqyClpKLQ U4Cof/TLllguqcQpEBBuN6xdrbHUMJfRX5bVgum+js04Lk9ImuC12dH6jB8dWDn51kQ9 pMApAk3W8s+0AByLZH9G+/sNsUIgWp/aMqi+WwnmNN0c5NYb0FfPWqQ5tmh8tqbICh+4 qc6zFWPKemXHt5jCTYvkFOaFXVf5vs7GnI4hVF5Wj+UM+EfxqqgpSMtyiaT+EPgTrl3F 8tuR95Hr4GboBN39VxpdIDhNwRrFXju/NDQ2HEAKgOUNeeVu4G1kgms0U1qKOjy32U7C c0UA== 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=EGc0yXuTiDFTGIiyB8RKG2RROl6pKeDEVLqeD/qlySQ=; b=Mit7qqJIHQ2/hb4Od7vQqPvbph9mrK1CgfclzInu+b7oklouRyfdgu2cWa0rT/OTyw Wib7omEnsZA7HNkOBhqUSeP6aVJmdFFdGqB5DLUbcrRICN9xERyTLtvlmpkuxxG7/8cp hy57NWEZFI2zGQTeJ8aMyZ4h3Gs8WtrQan2RsZWjdLJ700rrIluSRIG4pkPNyKHP16Pk appcgCtTVOeFA2sBNmW2HvoWranzMWEEp19cgkPBNBchonTjcBOeyb9fdjs/R3uJLLVK V0nwltT/cnB5lfCgmaQknVks5psTtkzb1YY3HuYf6sHwea5WVr1+hZXpp9ETGehHfQGJ ntoA== X-Gm-Message-State: AOAM531i2MZSb822NEtd29eLLl2SdAhXZz/WU/5si8mLwbVmRRPz4E8p eX4koe4wn2fxx8l0NmuA3bCVhXFCBh21yg== X-Google-Smtp-Source: ABdhPJxQ7DZ6I7oOzap9bBKEMFXCm/suuPFfs+wc6lgap5FkPRR1GPgiwQFHEnBKqx2fZHFh/ybsYw== X-Received: by 2002:a1c:988d:: with SMTP id a135mr4186180wme.8.1599165047136; Thu, 03 Sep 2020 13:30:47 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id q186sm6818274wma.45.2020.09.03.13.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 13:30:46 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v2 03/20] ASoC: sun4i-i2s: Adjust LRCLK width Date: Thu, 3 Sep 2020 22:30:17 +0200 Message-Id: <20200903203034.1057334-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903203034.1057334-1-peron.clem@gmail.com> References: <20200903203034.1057334-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-20200903_163048_621219_7D247EC9 X-CRM114-Status: GOOD ( 13.57 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [peron.clem[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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, Takashi Iwai , linux-kernel@vger.kernel.org, Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , Maxime Ripard , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Marcus Cooper Some codecs such as i2s based HDMI audio and the Pine64 DAC require a different amount of bit clocks per frame than what is calculated by the sample width. Use the values obtained by the tdm slot bindings to adjust the LRCLK width accordingly. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index acf24f512f2c..1b4482b0f4af 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -478,6 +478,9 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, return -EINVAL; } + if (i2s->slot_width) + lrck_period = i2s->slot_width; + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, SUN8I_I2S_FMT0_LRCK_PERIOD_MASK, SUN8I_I2S_FMT0_LRCK_PERIOD(lrck_period));