Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2618042lqp; Mon, 25 Mar 2024 04:44:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWj8iOGPkDGZxA0oXZbSwA5zC5KcolyRmUfAsj8sWv6UsTV8ScTDRKiNt7l6M6n9eJ+aSaA96iik7jEPDdbbq01+w3f/E8PBwWCdktNkw== X-Google-Smtp-Source: AGHT+IH6w0/SOc98kbtQT7qw24UB4jUa+sHUHc2FcjsfP9nZ5CJQ32EFkG47fadDYftLMT1hr6Ty X-Received: by 2002:ac8:7d89:0:b0:431:43cb:d704 with SMTP id c9-20020ac87d89000000b0043143cbd704mr7488748qtd.18.1711367058406; Mon, 25 Mar 2024 04:44:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711367058; cv=pass; d=google.com; s=arc-20160816; b=boygRya0/Nc86RTQPaj0tBO5yIOByUtuYv4Ga0CZA3oTsBZBEKtAn+3JWSYP72aNfN kPGybI9LLQZ6DcLsx4AM4jFitExd101j57hWC7wgj8kDvAe7/ouwr2DOgVxVhJsLGF4z H2EwH6CXGDJ7f0a5T+P+h7Jq0RBxMAwfldU2tsgZ5p4C+U98Jb8697nGeEnJsWCGDtPT 2LN/QwB4pJRpiFIkfzK1aovD2Z2u45LKMJSFMP5OaT5ojeL28+RGPpBMZkPnYeaxjAiF RwtOLBiNK7HGuHlKAzlzekS0azwW+QafUPQUYRGZWBNEXaZmIuUww1b2kO7zLFJ5srTt tcOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XuvZGUWI/2af9wzbv5nVWVciZ5BfYGEg54EHlxOF0BU=; fh=Q8YkG7eLocoIzTd0FLSFkkiLp8SSoQqFNMpX42zCTrs=; b=rdnv6GV2YqvE41XlV0k/hDaN9DF7YAee8+7SSugI2uKsBrKF6VoMUSwVyLD9Hlc89z 3xHNFAs98wYAG/9rVA8sM81MXOYrxN+OwYNZLAxnuq4ksCHvxWFNXIJdyuYsfpI6LNCH HX84Yah+qpbxeoLy/Uye4ZyI0wtWMxEj9g6O86KggKSby9gCt4m0Nxw+IOPBtGrykO3d 4+vLCPG30SPQteXZOmuDDna8xAjsv4jDOG1s6TBfUm/hnS4Vkpb1WFHA9p2da1Q/bENn ncU3ueZ4QCeZTZcbRHeiLBjKdQxL2AcuTfSn3K8pXCVHV+mPN7Bxw2JTd9AmXoBZld3v g9Bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQ1W0nxx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ev13-20020a05622a510d00b00430d161a065si5175817qtb.248.2024.03.25.04.44.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:44:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQ1W0nxx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F74B1C3513E for ; Mon, 25 Mar 2024 11:44:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C55F3BA33E; Mon, 25 Mar 2024 03:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XQ1W0nxx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E295284551; Sun, 24 Mar 2024 23:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323792; cv=none; b=r+l3ouKoDbH/GPYyWcO/+hvzED80XWWdwFUbp/wrmhmL+gDst1f9H5RsaXRDhq0gHEVfmd4oY9TQKCUqMecToQZj/ORyy4G8iBYXx8Orn1J8fnmacTuxBB5GLjcVRQD/WkqE2NHTmeZ0mp31/g1G2VFQbY8OuSbiS3Qfa/iuNqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323792; c=relaxed/simple; bh=s6m5EmNhs2Ghj/NYFkNGqUdDS4byPtOw1zu8uhIlB5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nEOfip5TD8Eeb6onJxAJnMDeemBdNbirTnLMbtr9lVZ6aYa5YzZNHE98nuXS5gPuxx7kPaMzmg4+uqdIiLsrG7aRue1ykVKi8e2xdnf+axsMkUpovCfZdcYSIL+lbgsMvD+IVN5bVz7jg/um4Bs/X518+aRTiilnJFtV5c2+Q5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XQ1W0nxx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 580F0C433F1; Sun, 24 Mar 2024 23:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323792; bh=s6m5EmNhs2Ghj/NYFkNGqUdDS4byPtOw1zu8uhIlB5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQ1W0nxx5wVIewUNDsMMfY7Q7JC0D3z2p/GSOmj3jAvYpZCrcVw7hxp2FVnuYKlVu XCpl42vrH47lxFd4sdhn5EVVt4Ck1Yp9z1jh6IrZUYinIN/LoKd+ztAoKtzhF057Wj dneVLUpTbdQBnDSGwX/tLE9O68wzWH3nj0QxmkgJfP925JjOG25S+mYNLS/WCc2J9Q YI5E6CvgaVtjnU+nFdrgJM0q2pEDbkfL106WzMMlOPw5vI/sPSfqK8dx4obixyq8Po x/KW6/FsziIrfS6AdLtH1v8zZ7LjmE60+7SGFeV+3T2LNW5ezVS0Cu6Vd3zXb/LtBy gfh+/6YQg60Iw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jerome Brunet , Mark Brown , Sasha Levin Subject: [PATCH 5.10 169/238] ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs Date: Sun, 24 Mar 2024 19:39:17 -0400 Message-ID: <20240324234027.1354210-170-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jerome Brunet [ Upstream commit e3741a8d28a1137f8b19ae6f3d6e3be69a454a0a ] By default, when mclk-fs is not provided, the tdm-interface driver requests an MCLK that is 4x the bit clock, SCLK. However there is no justification for this: * If the codec needs MCLK for its operation, mclk-fs is expected to be set according to the codec requirements. * If the codec does not need MCLK the minimum is 2 * SCLK, because this is minimum the divider between SCLK and MCLK can do. Multiplying by 4 may cause problems because the PLL limit may be reached sooner than it should, so use 2x instead. Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") Signed-off-by: Jerome Brunet Link: https://msgid.link/r/20240223175116.2005407-2-jbrunet@baylibre.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/axg-tdm-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c index e076ced300257..ac43a7ab7bcf6 100644 --- a/sound/soc/meson/axg-tdm-interface.c +++ b/sound/soc/meson/axg-tdm-interface.c @@ -266,8 +266,8 @@ static int axg_tdm_iface_set_sclk(struct snd_soc_dai *dai, srate = iface->slots * iface->slot_width * params_rate(params); if (!iface->mclk_rate) { - /* If no specific mclk is requested, default to bit clock * 4 */ - clk_set_rate(iface->mclk, 4 * srate); + /* If no specific mclk is requested, default to bit clock * 2 */ + clk_set_rate(iface->mclk, 2 * srate); } else { /* Check if we can actually get the bit clock from mclk */ if (iface->mclk_rate % srate) { -- 2.43.0