From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 787BDC001DB for ; Sun, 13 Aug 2023 16:14:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 869CEE72; Sun, 13 Aug 2023 18:13:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 869CEE72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691943262; bh=7EfpjV6UkQb8GEClCzJ7rPtqBaocAGoLvvZIn10Dp2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ptiHNE5q3tWfJeb/qxWpPGTietf72aGm2QVMxTqEM3WPmAs9tfPFp4mMrLkN43RbN FZDJXrgpulzP04OW8F7jYwGjII+ZDkvbemenLT0h1gNKGlWqahTwG/E5jNsZCuS3uT 06k4igsmNTiUkViwIkMn/1g+yIOS7rrFx1dYbAa0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C21B7F80571; Sun, 13 Aug 2023 18:13:13 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 58805F8057B; Sun, 13 Aug 2023 18:13:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED1ECF80551; Sun, 13 Aug 2023 18:13:08 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 133A5F80254 for ; Sun, 13 Aug 2023 18:13:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 133A5F80254 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=e/cNy+bq Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 006EE63C10; Sun, 13 Aug 2023 16:13:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EA9CC433C7; Sun, 13 Aug 2023 16:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691943184; bh=7EfpjV6UkQb8GEClCzJ7rPtqBaocAGoLvvZIn10Dp2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/cNy+bqaWa+nMLSt36egv4eqTrBypb8gJmwQGnMvkfbcau2uMwQzeczMMgmOPcCl idESWwToDo/Io+5rafgUDHr3/v0b4zh7oT1/vQLZmKHkIH61Xr/4QE3qj+I2mFmcY2 3ALm6kZLkQJf1pmcmUdlNZ8I5kFVNCNTEbU0m5C2HiFvsldRfFIlVhlYlyOeL+z4Lp 7A+zYELgxEBC5OABMPSPZd0UQxuAJx7KPpKevKIpL3TKWClFvpXoDWIvLjeTGEeESX nln6G9af906NDSr+eScTxUwTWQd4nI/skjq44ikLvpy164I1wH0YNHeD3WvdOLw8B7 PkVPE7mJHskkQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Guiting Shen , Mark Brown , Sasha Levin , claudiu.beznea@tuxon.dev, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 11/14] ASoC: atmel: Fix the 8K sample parameter in I2SC master Date: Sun, 13 Aug 2023 12:11:59 -0400 Message-Id: <20230813161202.1086004-11-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813161202.1086004-1-sashal@kernel.org> References: <20230813161202.1086004-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.4.253 Content-Transfer-Encoding: 8bit Message-ID-Hash: EMHEE5HJSTSZNFZJOFU55S3L53Y4X7AV X-Message-ID-Hash: EMHEE5HJSTSZNFZJOFU55S3L53Y4X7AV X-MailFrom: sashal@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Guiting Shen [ Upstream commit f85739c0b2b0d98a32f5ca4fcc5501d2b76df4f6 ] The 8K sample parameter of 12.288Mhz main system bus clock doesn't work because the I2SC_MR.IMCKDIV must not be 0 according to the sama5d2 series datasheet(I2SC Mode Register of Register Summary). So use the 6.144Mhz instead of 12.288Mhz to support 8K sample. Signed-off-by: Guiting Shen Link: https://lore.kernel.org/r/20230715030620.62328-1-aarongt.shen@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/atmel/atmel-i2s.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c index d870f56c44cfc..0341b31197670 100644 --- a/sound/soc/atmel/atmel-i2s.c +++ b/sound/soc/atmel/atmel-i2s.c @@ -163,11 +163,14 @@ struct atmel_i2s_gck_param { #define I2S_MCK_12M288 12288000UL #define I2S_MCK_11M2896 11289600UL +#define I2S_MCK_6M144 6144000UL /* mck = (32 * (imckfs+1) / (imckdiv+1)) * fs */ static const struct atmel_i2s_gck_param gck_params[] = { + /* mck = 6.144Mhz */ + { 8000, I2S_MCK_6M144, 1, 47}, /* mck = 768 fs */ + /* mck = 12.288MHz */ - { 8000, I2S_MCK_12M288, 0, 47}, /* mck = 1536 fs */ { 16000, I2S_MCK_12M288, 1, 47}, /* mck = 768 fs */ { 24000, I2S_MCK_12M288, 3, 63}, /* mck = 512 fs */ { 32000, I2S_MCK_12M288, 3, 47}, /* mck = 384 fs */ -- 2.40.1