Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4542087ybl; Mon, 26 Aug 2019 11:59:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/aU6UILYDv4n5KADnK+QOv/lUroUMl37l5dAzdS2SkXzQU5ruTYjAoTomsVpmmGguyD55 X-Received: by 2002:a17:902:bc49:: with SMTP id t9mr20664339plz.277.1566845973429; Mon, 26 Aug 2019 11:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566845973; cv=none; d=google.com; s=arc-20160816; b=IwQo1g9ZVC8iHNPnj1KNcwiAiDejO2hCDUNubdXY6Q897nJ0IDWu9I04coYhZ1Ei4B 43/rjTyqIWDopqsAs0uOml3PoIHs1zfPa1Q23Wf8gOG0+qga/4u/itsbj10KDJl9nVCG o/g6sErj2T7dp1adIl1RgYA7V8OGSg2BI/uiDpM5M6JZTN92+uKoppAmhcwgbECdNAfp cCHLeWFFhc3z03UPZwvPSjru7+vavTwIwVzoS/3uMJTC9jCFvbJ+JfGnPcMBSbbXiI+y nx+ZOVpuBS3lmzzR3GG4eP+iAYGpAXcjdyna4Q7zdzUVeBliRzMOTX93o3T6soUb8wHt zwsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P/7Ac+4X6tEO+jpy2vLz06LyblKHxTeQKnAx8UL/5B8=; b=D5Q2mtdBztKlXUlZewStykDquX3Ukea1b9HcRmEpH3llun57Ty+hdW3XyQ5W6TRWJH SLZ/LBcmt3J6mw+P7wQEXvptEqR5E7mq/teMnYdztj5347pguidS0K4k5OuyU+LQb3Fa ONFObMNoV7g1bOYTYqSoaz0TslVYpgFd4Pqx8UGFB/5Djjngva1B1Ue4eBt52T5xsQax GeN6jnNb1LhXgQLZ9AXr0WDdgWcc8jkw0EAsUcPTVeDZVTIb7mmHGIhslLdlMYPIRNlT L848wMvVYehrm2g9+gUeqYrjHcgzBZgF+9QMu1zz3eXR3utQUv55HB5CU7SIc8JwK8J9 MF/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GwyfHcpH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id b18si10059871pls.125.2019.08.26.11.59.18; Mon, 26 Aug 2019 11:59:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GwyfHcpH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2387695AbfHZSHv (ORCPT + 99 others); Mon, 26 Aug 2019 14:07:51 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35121 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387669AbfHZSHm (ORCPT ); Mon, 26 Aug 2019 14:07:42 -0400 Received: by mail-lf1-f65.google.com with SMTP id h27so7107561lfp.2 for ; Mon, 26 Aug 2019 11:07:41 -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=P/7Ac+4X6tEO+jpy2vLz06LyblKHxTeQKnAx8UL/5B8=; b=GwyfHcpHh6oCnOObXxprhf+5ZJySN4hhx4pk0Sfe4JaSQbx2PWs9c+R43Ast0qnzoE LcwntTn4M3aJIAuL3KYpk9Od3Dg+XmFowEempsIwPBGnd9R/8B30Vox8n2jrJZgNqdjg IeR3b/03SRv4FV10zzkl6pBWJbPoGrM/a5yPavLCDNoQKVXQbtep+q0HCzmTc7/G/M+f qwC0oLckmd8bIeU/IDJb0jjeN3i9HBL11iHIynCLwl+3mm0L0kpUsXZ6jugjiZAUgniU XC/HioTr/phLLSjNCYaqeaJjc+mdMfvR6IOZ/SM7Rqa4jIb5qpIbYLf4JRd972wjeeFZ BRmA== 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=P/7Ac+4X6tEO+jpy2vLz06LyblKHxTeQKnAx8UL/5B8=; b=HCoA4v3ksKjK+hlHB0/eTbCJ9iuFIfVRqSuginsiIH2HsxLanQD8fcBwozCzCa6v0r +mO3F1FxzV8L9U2TPaHkAX3LV+ye+XYJWh0QvQjty4jNEqC2mta9KGvb4gslY9CFJVYR R1wkktO6veAeEC5Cmv6iJd8JbmfQ7/4akTOBjM6pc34Dv1UEsqLoF9r3WmLhQJlGXE+a emBslQuTsw+Jfw2Dd9KyIWQ/NwF6h8hT1lHurHpNVyIpq1X0nH+tzK0fro7ZbmBZ+DQr LmWhi+uF9eIZZqO/2Ve+d8O2RUp+P6EPU6WD2Pj+EpvIHl8YHHIh/IKbeKQzUCtFPXct 6k2w== X-Gm-Message-State: APjAAAX4Ng6YJlwmZTgXnxTDRABUlgYu/nZUleJFUVSwy0TlOoBaDfJ1 Qvv86tMeJZo0ovdJeLOIos2ovOPv X-Received: by 2002:ac2:44af:: with SMTP id c15mr12669898lfm.32.1566842860391; Mon, 26 Aug 2019 11:07:40 -0700 (PDT) Received: from localhost.localdomain (c213-102-74-69.bredband.comhem.se. [213.102.74.69]) by smtp.gmail.com with ESMTPSA id u3sm2215564lfm.16.2019.08.26.11.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 11:07:39 -0700 (PDT) From: codekipper@gmail.com To: mripard@kernel.org, wens@csie.org, linux-sunxi@googlegroups.com Cc: linux-arm-kernel@lists.infradead.org, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, be17068@iperbole.bo.it, Marcus Cooper Subject: [PATCH v6 3/3] ASoC: sun4i-i2s: Adjust LRCLK width Date: Mon, 26 Aug 2019 20:07:34 +0200 Message-Id: <20190826180734.15801-4-codekipper@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190826180734.15801-1-codekipper@gmail.com> References: <20190826180734.15801-1-codekipper@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- sound/soc/sunxi/sun4i-i2s.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 056a299c03fb..0965a97c96e5 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -455,7 +455,10 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, break; case SND_SOC_DAIFMT_I2S: - lrck_period = params_physical_width(params); + if (i2s->slot_width) + lrck_period = i2s->slot_width; + else + lrck_period = params_physical_width(params); break; default: -- 2.23.0