Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2394272lqp; Sun, 24 Mar 2024 17:33:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUE9X9o5XhKxW0X9nFkgNOkvZ0TH//6rJYIEyCBpubsntlGicwhuElA4dennxT8G1ohbrMRaaSWdSQL4iK2so7YJtZWd2YKm7AzQx5V3A== X-Google-Smtp-Source: AGHT+IGHtt3Z8DrYPmpwINj3CbyFfMn829t/3TKqhCTSXkKGdBynN9e2O3DffEHR+CM2c8mzFEuw X-Received: by 2002:a17:902:e752:b0:1e0:b5d4:9f60 with SMTP id p18-20020a170902e75200b001e0b5d49f60mr2483099plf.28.1711326783667; Sun, 24 Mar 2024 17:33:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326783; cv=pass; d=google.com; s=arc-20160816; b=J51yuGcv9uFS5prsdjLAx47wEydhMs+pjDZziwZUyQ+4fVOK97nLMhfTJRBG/BR6ZJ MdQXhnQTsjN+v6F/Rm2rrx/PbHQxZCMZ6jOHExgDQsySHkSPYXhnQ7SB8RkTcCE5HCOh 4hI1mVbb7uvSXud+YIuSOMrqQo5moSnlshH9Sejd0GnwqFr6w4BpFs9c2vgJ70h6bhkS 3km4/sdKLwiR+5FE7QMmnrGRlTZ2UAmS84B+gInuyxDbrzhntRgtVqEQ6FR1AWgFdVRi t0nmXvfD93YrId7AGqa+QfzqgmiFNS/oU6FpAh7mDlh0jLzTHLUWCfy2IZ0qbdGHs8fF 25xw== 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=3ePwhguot/WCTIbrFPJUChP83DpwBExpbLqBnMtCLf8=; fh=Q8YkG7eLocoIzTd0FLSFkkiLp8SSoQqFNMpX42zCTrs=; b=QW9AdSYgGhDfQDLRPf/W+qy9FC3oa3s38uEGvjQQrSoby+mYl+8BteJqyXYameUjE2 CoLO/FCs3mXhv67PLaeO/d+UnrKDeTzYre/EQE009M4QFRFapKrlFtgR/xY9tR6gd+hl snpe3Buj4VOwtg1KhVkgYoD28uWGeKqKVY32Vofzgz27C7CLBpc0RQF5HlsZAcrIgBMG YPMjI/EyG9nN1+oWxr64XVwYkiLGHEYP4KUDsaSy1brjBPGoJr5SyXztaczMnBnz6UvH AJfUlzZ16vj8Mur00Ee8jdpxHbDDQ6JEs2LlAn4yj7gDqqNu++l0NV90kaaKPd7Umw5h bfdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cx8SrXbC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f4-20020a63de04000000b005cfbea76cf8si6578120pgg.42.2024.03.24.17.33.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cx8SrXbC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113371-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A2811B22FCF for ; Mon, 25 Mar 2024 00:20:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2E8419E671; Sun, 24 Mar 2024 22:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cx8SrXbC" 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 DFB0D19DF7B; Sun, 24 Mar 2024 22:42:52 +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=1711320173; cv=none; b=P8KEqJdwhGsP+xQVc3asHEr8BA+LmZSclOomqszoihG24qlqAVkI1krgvrbCIKOyh1jqI2OzqvwGwvybhMG5OfF5dmcnKCtCnszduVnq9cihfXVw6DefmZrEIJuXAnA2+Ccs5AM8XVm+6Pwm5p1bY0f9ggc5qfl0YbU+yOBEPUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320173; c=relaxed/simple; bh=M1XBoXiOTq0p7mgERHXcig2Q0cM/9V/unK6ZP5x0oO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sfbyni29r2Ct2cTzCHgUdJM/UBXPHWRhkuaTw8lX/XEvR7u27fgNoiM3cpqwWmQJZNyRag/EzxfVPW6lE1aYkp4Vvfnddk8NOv7YyEviS5KJyqOryfLq/Eq36Fqru5H59sKkKCtxkbEau8ePuEq3+Ej1J5OvGaAc/RpDVR7SoKo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cx8SrXbC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C36F5C43390; Sun, 24 Mar 2024 22:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320172; bh=M1XBoXiOTq0p7mgERHXcig2Q0cM/9V/unK6ZP5x0oO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cx8SrXbCAsJIeNdXwKec+ZS0Piqz+vKvfWtMbQDcyWxuMc19VUCc1mG8DhDaMbazR A9qtXn0e9c176Zess25q4syv6fuV7XlcOy74TqiYEmEdPcipmX71JmnABskQWsdOTQ LSD2gMXW2B+akjmoaCXnPJjyvzcEIGWdFSSzFpnn9r5GWVDHc9kC2an73XNt+qtlAX k4i2E+q+uuxcH7PjhEM/IHOaxT6QrYnCZnQIDsSzI/PnwbHiDmQbDgmPgvmt3DGniV h2IoKajLmDxFlMoxlX0Eto+IG6JUA4s7ZryYHiyB2p5q83bsa5149bUEeRCB+KiNQO f4r04wOYxxGfg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jerome Brunet , Mark Brown , Sasha Levin Subject: [PATCH 6.8 480/715] ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs Date: Sun, 24 Mar 2024 18:30:59 -0400 Message-ID: <20240324223455.1342824-481-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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 1c3d433cefd23..cd5168e826df4 100644 --- a/sound/soc/meson/axg-tdm-interface.c +++ b/sound/soc/meson/axg-tdm-interface.c @@ -264,8 +264,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